T3D 1.1 Beta 3 - defaultCar wheels stop turning and sounds stop playing - RESOLVED
by James Novosel · in Torque 3D Professional · 12/29/2010 (12:40 pm) · 7 replies
Build: 1.1 Beta 3, 1.1 Release
Platform: Windows XP 32 bit
Target: In-game animation of wheels on default car stops playing during game play
Issues: When the defaultcar is placed in a mission and driven the wheel spin animation stops. The car continues moving and steering properly but the wheels are locked/not moving. If you exit the car and get back in the wheels begin turning again. If sounds are enabled (uncommenting the engine idle sounds code) the sounds also stop playing when the wheels stop turning (start playing again when exit the vehicle and reenter). This is happening with the default car or models rigged (code wise) in the same manner.
Steps to Repeat: Place the default car into a mission and drive it. Surface does not seem to matter but is most easily repeated (for me) when driving on a flat surface (the terrain or a road mesh). If the car is driven slowly this does not appear to happen (so drive fast).
Suggested fix: Unknown
Link to Console Log: Nothing unusual in the console log
Platform: Windows XP 32 bit
Target: In-game animation of wheels on default car stops playing during game play
Issues: When the defaultcar is placed in a mission and driven the wheel spin animation stops. The car continues moving and steering properly but the wheels are locked/not moving. If you exit the car and get back in the wheels begin turning again. If sounds are enabled (uncommenting the engine idle sounds code) the sounds also stop playing when the wheels stop turning (start playing again when exit the vehicle and reenter). This is happening with the default car or models rigged (code wise) in the same manner.
Steps to Repeat: Place the default car into a mission and drive it. Surface does not seem to matter but is most easily repeated (for me) when driving on a flat surface (the terrain or a road mesh). If the car is driven slowly this does not appear to happen (so drive fast).
Suggested fix: Unknown
Link to Console Log: Nothing unusual in the console log
About the author
#2
Later today will try to get back "in history" and check when it was fixed. If I find what was causing this, I'll post back here.
01/11/2011 (9:40 am)
I *think* we have fixed this bug in our project, but I can't find a fix in our repo :(Later today will try to get back "in history" and check when it was fixed. If I find what was causing this, I'll post back here.
#3
At the beginning of Player::setControlObject add:
01/11/2011 (10:23 am)
Okay, looks I found it.At the beginning of Player::setControlObject add:
if(mControlObject == obj) return;so it looks like this:
void Player::setControlObject(ShapeBase* obj)
{
if(mControlObject == obj)
return;
if (mControlObject) {
mControlObject->setControllingObject(0);
mControlObject->setControllingClient(0);
}
..//skippedNot sure about the sound, but this fixes animation issues for us.
#4
01/11/2011 (12:32 pm)
but dont these lines below that do the same??if (obj == this || obj == 0)
mControlObject = 0;
else
#5
01/11/2011 (12:46 pm)
Nope. My code checks if the new control object is the same as the original one, and if so - there is no need to re-assign it.if(mControlObject == obj) // Is is the same?
return; // If so, don't do anything
if (mControlObject) { // Do we currently have any control object?
mControlObject->setControllingObject(0); // if so, remove
mControlObject->setControllingClient(0);
}
// If we get here, it means we want to assign new objectWithout my code, if you call to setControlObject the same one (like Vehicle), it will remove the vehicle as controlObject and assign it back again.
#6
Due to a mix-up with this ticket, I was pointed to this thread instead of here. I posted my comments and fix over in that thread.
The good news is Bank and I both came to the same fix independently, so it seems like a good one. :) This fix will be in the next release of T3D.
- Dave
01/28/2011 (12:03 pm)
Greetings!Due to a mix-up with this ticket, I was pointed to this thread instead of here. I posted my comments and fix over in that thread.
The good news is Bank and I both came to the same fix independently, so it seems like a good one. :) This fix will be in the next release of T3D.
- Dave
#7
04/24/2011 (5:11 pm)
Fixed in 1.1 Final and Preview.
Torque 3D Owner Ray Batts
Sickhead Games