I need an indicator on my hud that hovers above an object, but when the object is out of view, it moves to the closest edge of the view to the off-screen object.
Could you better explain what is happening right now and what you would like to happen?
If you could tell us what behaviours/events are you using, it would be a lot easier to give advise on what to change..
Prepare for my highly advanced animation skills. (No, its not real life, just an animation. I know its pretty good)
The green thing is what I want
And what part of this are you having issues with?
I don't know how to do this.
Edit: This is just an animation made with Stykz.
One way to do this is to clamp the X, Y values to the screen edges after moving it to the spot above the character. So if X + arrowWidth > screenWidth, x = screenWidth - arrowWidth, etc.
Develop games in your browser. Powerful, performant & highly capable.
Thanks! I'll try that!