Can I have my character latch to a moving pad in my game whilst he is standing still?
How would I go about doing this? and can I use tags?
Can I have my character latch to a moving pad in my game whilst he is standing still?
How would I go about doing this? and can I use tags?
Make it a child.
function OnTriggerEnter (other : Collider) {
if(Player.parent != Elevator){
Player.parent = Elevator;
}
}
function OnTriggerExit (other : Collider) {
Elevator.transform.DetachChildren();
}
You might have to alter this, but meh. You get the point =).