Game Development Community

SceneObject::Mount()

by practicing01 · in Torque 2D Professional · 05/25/2013 (7:59 am) · 1 replies

https://github.com/practicing01/Torque2D/tree/development

I think I've succeeded in making a simple mount function. I looked at SceneWindow's camera mount for clues. It works for a rigid mount with offsets (rotation and "softness" don't work (no interpolation)). It would be cool if someone who was interested in this could help finish.

Edit: fixed rotation :P, i'm not touching interpolation for softness though. Also, someone might be interested in mounting without following the parents rotation. Also, multiple mounted objects (let's replace composite sprites!)?
Edit #2: changed some code and now multiple objects can attach themselves to an object. Interpolation and rotation being optional is all that's left to do. Multiple objects can be done through lists but I didn't want to get into that.

#1
06/03/2013 (1:02 am)
"let's replace composite sprites!" hahaha, "let's replace your apple with my oranges!". There is 2 main way to "mount" your object, you need to consider, are you attaching what are really 2 separated physic object together, if so then sure use a physic joint, or are you just composing object together and can treat them as a whole, then why on earth would you use physical joint instead of sprite batching it all together...