- Home /
Questions about rotation.
Hello !
I'm currently learning how to manage GameObject rotations, but I'm facing some issues. In my project, the player is a kind of ninja, who can grab walls and some platforms by dashing ( right now the player is a capsule ).
The character has an empty gameobject on the bottom of his body, which is the starting point of rays that will be used to determine the trajectory of a dash.
I would like that when the player catches a platform, the bottom of the player is on the side of the platform. (If he grabs the ceiling, the lower body or the player's feet will be stick to it).
So I have the point of collision between the player and the platform, and I would like to turn the player so that his feet are against the platform.
I tried many, many things but none of them worked.
Any idea ?
Thanks a lot.
Answer by ggastonuy · Nov 27, 2018 at 01:23 AM
Have you tried computing the surface's normal vector? , then you should rotate the player according the vector's direction.
Your answer
Follow this Question
Related Questions
transform.forward does not work with Rotate(Vector3.up) 0 Answers
Make a camera collision 1 Answer
Odd collider rotation 1 Answer
Going through floor glitch 0 Answers