So I have a problem, Im trying to get the player to rotate according to the normals of the surface below him. It works, however if you try to jump across platforms that are each slightly more rotated than previous blocks the player slowly shifts and eventually falls off. This is especially apparent if a moving platform rotates, the player will slide off. Here is how I'm doing it Heres a more in depth version with visuals and actual scripts: http://answers.unity3d.com/questions/901382/trying-to-rotate-player-how.html In short, the player rotates according to the normals but his position remains the same which causes glitchy inaccurate behavior. How can I get the player to pivot (or whatever you call it) instead of just rotate?
what i could do in such case is to create a trigger for uneven ways then, create an animation for tilting to left and right, then you control them with CrossFade when the player is inside the trigger ... this is the way i`m doing. and works.. maybe looks like something basic.. but work at least
hi, thanks for the tip, however my game is 3 dimensional and animations would not work. may i ask what kind of game you are making?
oh.. understand... my game is 2.5d, (3d world but only Horizontal axis movement)... that's why it works to me... Btw.. is even a good idea to implement a trigger on those areas.. so when player enters the trigger, you play the rotate run animation, now.. how to rotate the player..... well.. you could make it just like an illusion... create a new walk or run animation on your modeler and rotate the player in there,... the character controller will remain straight, but the run animation is rotated, you don`t need to worry about the result since the user don`t see the collider in the final release..... of course this only server when your slope ground is not too much uneven
The rotation affects thhe gravity. Theres too muchh to rely on animations and colliders/triggers is too simplistic and uncapable. Thanks for the idea though.