Game Development Community

Pushing objects

by Richard Chouinard · in Torque Game Engine · 04/16/2007 (12:04 pm) · 3 replies

I am making a game in which I need to push boxes around. Is there an easy way to do this? I have some ideas but they are fairly complicated. I thought about putting a trigger around the box. While I'm in the trigger and based on certain condition (if I click the box for example), my player would go in the push object animation. But after that, how will I move the box around with the player?

#1
04/18/2007 (10:09 am)
How about applying an impulse to the object when the player collides with it? In your box's onCollision function, you would work out a vector representing thedirection the player would push the box then use the applyImpulse method on the crate.

-- Amr
#2
04/18/2007 (2:06 pm)
If you have t TGE 1.5, it has rigidshape which can be move by the player.
#3
04/18/2007 (2:09 pm)
Wow that's new to me! Awesome news!

--Amr