- Home /
Question by
AtomicMarine · Apr 23, 2011 at 09:17 PM ·
movementcharacteriphonetags
Is it possible to have my character latch to an object?
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?
Comment
Best Answer
Answer by Justin Warner · Apr 23, 2011 at 11:19 PM
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 =).