Hi.
I am attempting to make a mechanic that makes objects fly in front of the player (in the center of the screen, not only the x and z axis) like a flying spell.
I was thinking about using a Vector3.slerp to make it move smoother, but I can’t figure out how to get the position of were I want it to float.
Please help.
Could you make a quick sketch?
You may e.g. have an empty game object attached in front of your character. Then query in each frame what the coordinates of that game object are in view port space. Then adjust the height to 0.5 to bring it to the vertical center of the screen, bring that back to world space and apply the position to the game object.
You also need to make sure that the game object is always in front of the character.