|
I followed the exact way that was described in the link. It works great with vertical moving platforms. However, when I got my character to a platform that was moving side to side, the character didn't move with the platform. Is their a way to compensate for this?
(comments are locked)
|
|
I got the simplest solution for this problem from another forum. So basically, you create another object with collider on top of your normal platform, and parent it to your platform. Apply this script to your collider object, and it should work. function OnTriggerEnter (other : Collider) { other.transform.parent = gameObject.transform; } function OnTriggerExit (other : Collider) { other.transform.parent = null; } Sorry for the late response, but I tried that and it just makes my character fall through the platform.
May 27 '10 at 07:08 PM
Helpmepls123
Ok I did something wrong. It works now but the problem I have is that when my player turns around, he just randomly disappears and the Character Controller keeps changing in size. What's going on?
Jun 02 '10 at 06:47 PM
Helpmepls123
(comments are locked)
|
|
Create an empty GameObject. Add a mesh collider in the shape of your platform, and make it a trigger. Then make it a child of your platform/elevator (it works for both), and raise it so it is just a little higher then the platform itself. Then attach this script to the trigger you made:
Make the trigger GameObject in the Elevator slot and your player in the Player slot. When your player gets on the moving platform, he/she will not slide off and will move with the platform perfectly in any direction. my question was the same, and i tried this answer, but! my character moves with the platform (i have rotating platforms) even when in the air!!! any ideas?
Oct 25 '10 at 09:03 AM
angad singh
I'm having the same issue and it didn't work at all. The player still slides off. I've tried many methods. Putting a CharacterController on it and messed with some methods that included that, messed with the Trigger method, and different versions of the parenting method. Nothing's working.
Dec 06 '10 at 03:57 PM
dre38w
Just to make sure I wasn't too confusing when I said "it", the CharacterController was put on the player not the platform.
Dec 06 '10 at 04:01 PM
dre38w
I'm also having this issue. It's a real pain and cannot figure out how to make this smooth connection between moving platforms and the player.
Oct 12 '12 at 02:03 AM
Sinron
(comments are locked)
|
