- Home /
Move Character Controller along Box
I am currently working on a game where there is no gravity and the character controller jumps from box to box in space. What I am having an issue with is:
When you are on the box (The box is your parent and your movements are relative. Also when you latch on your rigidbody.isKinematic = true;) the player needs to be able to crawl along the edge of the box, as well as around corners to the other faces. How exactly would I implement this? I have my character detecting when he is in a certain area around the box, as well as a condition for when he is latched onto the box.
Thanks!
(I am building my own custom character controller, so far the main differences are just that you can rotate 360+ degrees around indefinitely with the mouse in any direction.)
Any ideas of how to do this would help. I think once I know exactly which method to use in doing this I can figure out the code behind it, I'm just not sure where to start.
$$anonymous$$y initial thoughts on how to do this are to take the normal of the surface and the ray of the camera's forward facing direction and use them to calculate a direction along the surface on which to transform the character controller. Any ideas?