Question by
Equ1l1brist · Mar 02, 2017 at 11:54 AM ·
c#buttonquaternionrotatelerp
Can you make the player do a 180° / u-turn when a button is pressed?
This seems like something that should be very easy to develop, but I have been having some trouble with making my player do a u-turn / 180° when a button is pressed. Just like in Mirror's edge or many other games where it allows you to quickly turn around. If possible it would be great if this was done smoothly, so it doesn't just snap behind you. I believe quaternions and lerping might be important for this feature. If anybody could help me with some C# code that would be great! But pseudocode or java would be fine too.
Comment