SetDataBlock reset nodeTransform of mConvex from vehicle
by Lidwine Simon · in Torque Game Engine · 06/02/2005 (2:17 am) · 0 replies
Hi!
I have had a big bug of collision cause of a change of datablock when I destroy my vehicle (I transform my vehicle in a wreck).
I find that when I do the "setDatablock", the shapeBase::onNewDatablock() delete the mShapeInstance, and then the nodeTransform of Vehicle->mConvex are deleted. So I put, at the end of Vehicle::onNewDataBlock() function :
if (mConvex.nodeTransform)
mConvex.findNodeTransform();
It seems to work well, but I wonder if it's the best way to resolve this thing.
Any idea or information about that?
Thanks
I have had a big bug of collision cause of a change of datablock when I destroy my vehicle (I transform my vehicle in a wreck).
I find that when I do the "setDatablock", the shapeBase::onNewDatablock() delete the mShapeInstance, and then the nodeTransform of Vehicle->mConvex are deleted. So I put, at the end of Vehicle::onNewDataBlock() function :
if (mConvex.nodeTransform)
mConvex.findNodeTransform();
It seems to work well, but I wonder if it's the best way to resolve this thing.
Any idea or information about that?
Thanks
About the author