I’m trying to achieve this effect using shader . The tips is always on the right side. And the tips’s y is always related to the hotspot’s y.
Here is my idea of approching this:
- Setting the tips’ x to make sure the tips is on the right/left side.
- Using the hotspot’s transformed( projectionMatrix * viewModelMatrix * hotspotPosition ) y to set the tips’ y.
- Setting tips’z to 0.0 to make sure the tips always shown.
But I got this result:
The tips’ y seem not equals to coresponding hotspot’s y.
I thought there something wrong with the hotspot’s transformed position. But when I setting tips’ position to hotspot’s to test the hotspot’s transformed position, the result seems right to me:
Is there something wrong with my idea?