Game Development Community

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.


#1
05/25/2010 (7:40 pm)
Yea there is, I have gotten it to work before but could not tell you how. However I am going to be working on that project again and will try to figure out the rules.
#2
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.