Mount Object Assistance Please
by Ronald J Nelson · in Torque 3D Professional · 06/03/2014 (10:45 pm) · 4 replies
I have done similar things in older versions of Torque, but that was some time ago and I may have forgotten a step.
First, I definitely want to mount an object that has collision, not an image.
So I am trying in the following example to mount an object to a mount node. I know that the node exists, but no matter what datablock or object type, I have not seen it work. It behaves like it was successful in the script and console window, but yet nothing happens.
I would appreciate any advice that can be offered. Thank you in advance.
First, I definitely want to mount an object that has collision, not an image.
So I am trying in the following example to mount an object to a mount node. I know that the node exists, but no matter what datablock or object type, I have not seen it work. It behaves like it was successful in the script and console window, but yet nothing happens.
I would appreciate any advice that can be offered. Thank you in advance.
function Eliminator3::onAdd(%this, %obj)
{
Parent::onAdd(%this, %obj);
%obj.mountable = true;
%test = new RigidShape(){
dataBlock = BouncingBoulder;
};
%obj.mountObject(%test, 13);
#2
06/04/2014 (2:45 am)
Funny, I noticed this the other day. I suspect you'll have to dig into the RigidShape source and implement mounting. I've added a row for RigidShape to remind myself (or anyone else) to look into it.
#3
github.com/GarageGames/Torque3D/blob/master/Engine/source/T3D/staticShape.cpp#L2...
github.com/GarageGames/Torque3D/blob/master/Engine/source/T3D/staticShape.cpp#L2...
06/04/2014 (4:01 am)
StaticShape really does look like it should mount.github.com/GarageGames/Torque3D/blob/master/Engine/source/T3D/staticShape.cpp#L2...
github.com/GarageGames/Torque3D/blob/master/Engine/source/T3D/staticShape.cpp#L2...
#4
06/04/2014 (7:04 am)
Yep, it does. I don't know why I didn't put it in.
Torque 3D Owner Michael Reino
RigidShape derives from ShapeBase and isn't in the list.