minor bug: colliding/mountable object?
by Will O-Reagan · in Torque X 2D · 05/25/2010 (4:50 pm) · 2 replies
I tried mounting a sword to my player today, and had issues with it not seeming to be able to collide to anything. Then tried setting it's position, without mounting, and immediately got it to collide. Is there an issue with mounting collidable objects?
About the author
I have a degree in dramatic art, and literature, from UC Santa Barbara. I've worked for a few studios, also at Animax Ent in 2008, and some smaller studios. Currently studying Computer Science at CSU Channel Islands.
#2
lets say object parent = P, mounted object = M. The mounted object has its collisions set to whatever, it's all in the collision delegate. In M's collision delegate i tell it to act upon the parent P. So say being hit would kill the entire object the code in M's delegate would look like
Create M, make it a template. Set it's collisions and the onCollsion delegate. Drag a spawner object to the scene, it's template reference is M, mount the spawner of M to P. That should work.
05/26/2010 (8:05 pm)
Ok here is what I did before to get it to work:lets say object parent = P, mounted object = M. The mounted object has its collisions set to whatever, it's all in the collision delegate. In M's collision delegate i tell it to act upon the parent P. So say being hit would kill the entire object the code in M's delegate would look like
ourObject.MountedTo.MarkForDelete = true;
Create M, make it a template. Set it's collisions and the onCollsion delegate. Drag a spawner object to the scene, it's template reference is M, mount the spawner of M to P. That should work.
Torque 3D Owner Henry Shilling
Smokin Skull