- Home /
[Unity Issue] CharacterController falls through rotating platform
Hello,
I already read some solutions about solving the moving platforms issues but these solutions don't work with rotating platforms.
You can watch on youtube my issue. The CharacterController falls through the rotating platform: https://www.youtube.com/watch?v=gss_g-0xyDU
Do you have a solution?
I had a similar problem once and I solved it by 'parenting' the character to platform whilst moving (in my case it was an elevator that goes up rapidly).
As soon as I jump off I 'unparent' back.
Actually I tried the parent solution but it doesn't work with a rotating platform... Is it a bug in Unity engine?
Answer by Xtro · Aug 13, 2013 at 02:11 PM
No, it's not a bug. CharacterController isn't designed to be pushed by other objects. I mean, you can implement it with your own logic, but moving (or rotating) platforms aren't included in its design.
I developed a platform game and implemented a moving platform behaviour with character controller like you did. But I didn't have a rotating platforms.
I think the rotating platform implementation should be improved to be able to handle the rotation.
Can you post your rotating platform implementation here ?
Hi Xtro,
Thanks for your help.
This is the code:
using UnityEngine;
using System.Collections;
public class RotativeVerticalAxisPlatformScript : $$anonymous$$onoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
transform.Rotate(0.0f, 0.0f, 5.0f * Time.deltaTime);
}
}
No. Rotating platform implementation is not the rotation script. The character script should handle the attachment to a moving(rotating) platform. Right? I wanted to see that part of the character script.
Unless you write some code to handle that attachment, character controller won't even react to any moving object under itself.
Your answer
Follow this Question
Related Questions
accessing charactercontroller 1 Answer
Mounting a player character to a mount 0 Answers
Make a character rotate around a point. 1 Answer
Ui sidescroller 2d touch ? 0 Answers
How to use character controller to push down hinge joint properly 1 Answer