Projectile Collision only at pivot point?
by Alan Kennedy · in Torque Game Engine · 11/17/2003 (10:22 am) · 1 replies
Hi there. I was playing arround with Projectiles, and noticed (at least with my projectile dts, and everything), that the projectile collides with an object, only when it's pivot point collides.
I'm using as projectile, a simple sphere with a 6 sided sphere collision shape. If i use the exported DTS, as a StaticShape, the collision shape works just fine (you can collide into the different faces).
But, the projectile itself (using the same exported dts, cannonball.dts), won't correctly collide into other objects (including the StaticShape mentioned before).
My only guess is that the collision scheme used at Projectile class (derived from GameBase), is different from the one used at other objects such as Player, Items, StaticShape, etc (derived from ShapeBase which overrides the rayCast method declared at SceneObject).
Finally, the thing is, i want my projectile (a sphere), to collide correctly as a sphere would do, into other objects, and not only when it's pivot point collides another collision shape.
Regards, Alan //
I'm using as projectile, a simple sphere with a 6 sided sphere collision shape. If i use the exported DTS, as a StaticShape, the collision shape works just fine (you can collide into the different faces).
But, the projectile itself (using the same exported dts, cannonball.dts), won't correctly collide into other objects (including the StaticShape mentioned before).
My only guess is that the collision scheme used at Projectile class (derived from GameBase), is different from the one used at other objects such as Player, Items, StaticShape, etc (derived from ShapeBase which overrides the rayCast method declared at SceneObject).
Finally, the thing is, i want my projectile (a sphere), to collide correctly as a sphere would do, into other objects, and not only when it's pivot point collides another collision shape.
Regards, Alan //
Torque 3D Owner Daniel Eden
It's not particularly difficult to add a bounding box or convex collision to projectiles -- though, I doubt anyone who's done it will bother posting any code for it (myself included).