Game Development Community

Mounting objects outside their bounds

by Kzoink · in Torque X 2D · 06/22/2007 (9:46 pm) · 2 replies

In TXB, I would like to be able to mount one object to another outside of the object bounds. Currently, the limitation is that the link point can only be inside the object's bounds and the linked object's center is placed on the link point when mounting. This means objects can not be linked side-by-side or at an offset in the editor. The furthest apart they can currently be placed is 1/2 the bounds size of the object that is linked. The workaround I am thinking to use involves increasing the empty area in the image, but I bet there might be a workaround in code as well. Any ideas?

#1
06/22/2007 (10:16 pm)
I don't think there are any limitations on linkpoints being inside the object in the engine -- I think it's just an editor limitation. If you added the linkpoints in code you could probably set them outside of the object.

As an in-editor workaround, try creating a big T2DSceneObject (the "Blank Scene Object" in the Other rollout in the Create tab). Mount the SceneObject to object A, and mount object B to the SceneObject. This way you don't need to pad your sprites with blank space.
#2
06/22/2007 (10:50 pm)
Dan, that's a great idea. Thank you for the quick answer!