Jam prep – Trigonometry

Today I had a refresher course on trigonometry and how it can be when coding a game to triangulate player moments and rotation.

There was a total of four sample scenes that were available to test

Moving with trig, Moving without trig, Turning with trig and Turning without trig.

Theses each demonstrated the difference between suing the built in unity features for calculating values vs seeing how they are handled with out.

There is a noticeable difference with how smooth the turns and and rotational movements are, the code can also be altered to ensure that it stops priciecly in the direction that you leave the character rather than snapping to up, down, left right meaning it can stop on any angle.

 

Leave a comment