Item Collision
by Harley · in Torque Game Engine · 02/23/2005 (1:19 am) · 2 replies
Hey,
I am trying to make of a bit of a simple pool/snooker game using Torque just to get me used to the engine a bit and I'm having some trouble with Item collision. What I currently have is if you walk the player into a ball (which is an Item object) the balls velocity is set to the players velocity. This works fine for the time being but the balls at first went through each other. So I added ItemObjectType to the collision masks in the engine, now they hit each other. But now the balls wont fall off ledges?! They just kinda float in the air, like the z axis is being ignored? Any ideas or suggestions on better ways to go about this? If im not being very clear let me know and I will have another go at explaining it ;-).
Thanks,
Harley.
I am trying to make of a bit of a simple pool/snooker game using Torque just to get me used to the engine a bit and I'm having some trouble with Item collision. What I currently have is if you walk the player into a ball (which is an Item object) the balls velocity is set to the players velocity. This works fine for the time being but the balls at first went through each other. So I added ItemObjectType to the collision masks in the engine, now they hit each other. But now the balls wont fall off ledges?! They just kinda float in the air, like the z axis is being ignored? Any ideas or suggestions on better ways to go about this? If im not being very clear let me know and I will have another go at explaining it ;-).
Thanks,
Harley.
#2
02/24/2005 (2:53 am)
Thanks Eric. The ItemData has variables for mass, friction etc and I can call setVelocity and move the balls around ok. Its just when I have added the ItemObjectType to the collision flags it seems as if gravity isn't affected in regards to the z axis. If the balls hit terrain they will go up hills, just not down.
Torque Owner Eric Lavigne