- Home /
Help with Character Controller Platform Physics
So I made a moving platform script, and it works great, except for two things. The first thing relates to collisions. If the first person character controller stands in the path of the platform while it's moving, the platform will move through the player instead of pushing him. My platforms right now are cubes with rigidbodies attached, gravity unchecked, and Iskinematic checked. The line that does the moving of the platforms is:
rigidbody.MovePosition ((rigidbody.position + locationIncrement));
The other issue I have is to do with the character controller itself than with the moving platforms. Right now, the relative speed of the platforms affects the character controller whenever you try to jump. (for instance, if you jump right while a platform is moving right you end up jumping right twice as fast. Another one is if the platform is going one direction and you try jumping off in the other direction, the platform's speed is subtracted from yours and you don't really go anywhere). I want the character controller to jump around on the platforms in whichever direction he chooses, regardless of where the platforms are headed.
Does anyone know a way to add or change something in the character controller to get this to happen? Many thanks to anyone who can help :)