Rigid Body interaction question
by Nicolai Dutka · in Torque Game Engine Advanced · 07/21/2008 (11:22 am) · 2 replies
I am playing around with the default rigid body boulder that came with TGEA and was wondering how I can make it more interactable. In the editor, if I pick up the boulder and drop it, it will roll around, bounce, etc, but if I slam into it with my character in game, nothing happens. Why not?
Ultimately, I'd like the player to be able to walk up to ANY given rigid body and have him be able to push it (given that it isn't too heavy, which would be determined by that rigid body's datablock, yes?)...
Is this not built into the physics engine?
Ultimately, I'd like the player to be able to walk up to ANY given rigid body and have him be able to push it (given that it isn't too heavy, which would be determined by that rigid body's datablock, yes?)...
Is this not built into the physics engine?
#2
That gave me some onCollision code to work with. Applying that works really well, but there is the occasional physics glitch:
If I push my character against a rigid body cube in dead center, he can't move it (unless he hits it at a full run). This is good. If I continue pushing up against it and begin sliding toward one edge, once I reach that edge, the box goes FLYING through the air.
Other than that, it's all good.
07/21/2008 (11:57 am)
Ya, I found some code on TDN that helped: http://tdn.garagegames.com/wiki/TorqueGameEngine/RigidShapeThat gave me some onCollision code to work with. Applying that works really well, but there is the occasional physics glitch:
If I push my character against a rigid body cube in dead center, he can't move it (unless he hits it at a full run). This is good. If I continue pushing up against it and begin sliding toward one edge, once I reach that edge, the box goes FLYING through the air.
Other than that, it's all good.
Torque Owner Deepeyed
Hope that helps abit.