How to rotate a platform so that the player doesn not fall of when on it?

Hi guys,
The title says most of what this is about,but I’ll explain this a bit better.

I’m building a game where a player is on a platform that rotates around several axes.The rotation is happening along x and y axis and the platform rotates by set amount of degrees each time.I want the player to rotate with the platform and when the platform has finished the rotation the player should be able to move around independantly.
However when I carry out the rotation the player remains in his previous position and once the platform has rotated a certain amount of degrees and the box collider has moved,the player object just falls to his death.
Both objects have colliders and rigid bodies.

Haven’t tried this yet as not sure of what code I should use,but would it be possible to achieve this through OnCollisionEnter and OnCollisionStay events?

Any tips or hints on this would be welcome as I’m a bit stumped by this.
Thank you in Advance!!! :smiley:

It’s alright.I solved the problem by parenting one game object to another.
Here is the code for anyone who might want to use it.

public var parentObject : Transform; 
public var childObject : Transform;  

function OnTriggerEnter(object : Collider)
    if(object.gameObject.tag == "Player")   
    	childObject.transform.parent = parentObject.transform;

Simply attach this script to the parent game object and it should work just fine.
Give me a shout if you have any questions about this and I’ll try to help :slight_smile:

Hope this helps!