I took inspiration from the Crazy Taxi direction arrow, which guides the player towards their destination.

While this is a 3D arrow, I needed a way to render it to the screen as a 2D UI Element.
I started by creating my Arrow Object and encasing it in a 'Blue Screen' kind of shell to isolate it from the surroundings and give an easy colour contrast to make into the alpha later in the process.


I used a Render Target material to capture the arrow from the camera's point of view.
To isolate the Arrow and make the background transparent, I created a Material which removed all blue from the Material as an Alpha, which translates to transparent in the UI system.

To rotate the arrow object, I used code that set the player character as the origin and the Boss as a look-at target for the arrow, I then removed the player camera rotation from the YAW value so that it would stay relative to the camera rather than just the player model to avoid confusion.
And here's how it appears in-game on the UI:

No comments:
Post a Comment