I've been looking for solutions to be able to walk on spheres without falling down, and I stumbled onto the locomotion scripts which pretty much allow exactly this:
The character is not falling off the sphere, and the camera makes the sphere ground always appear below the player, which is just what I'm looking for. However, in my project I use a first-person view and regular first-person movement control. I assume it should be easier than the standard scripts, as no 3rd person camera movements and smoothing are required. I'm trying to modify the scripts, but I'm rather new to it and I haven't managed to get anything working. I'd greatly appreciate some help, maybe if anyone could provide me with a modified example scene where a fps view was integrated!
asked Dec 22 '10 at 11:02 AM
This should be rather straightforward:
Make the camera a child of the character and move it to the position you want it to be at (like around the head).
Use a MouseLook script from standard assets or from the UnifyWiki (like this one) - with a small modification:
Instead of rotating around Vector3.up and Vector3.right, rotate around transform.up and transform.right. (Note that Vector3.left (a deprecated variable) is the same as -Vector3.right.)
answered Dec 22 '10 at 02:19 PM