mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-22 08:03:45 +00:00
Merge pull request #1273 from Azaezel/alpha41/steeringSupport
play steering thread on server so mounted objects like turrets can be…
This commit is contained in:
commit
5d4925bec7
1 changed files with 7 additions and 0 deletions
|
|
@ -797,6 +797,13 @@ void WheeledVehicle::updateMove(const Move* move)
|
|||
// Set the tail brake light thread direction based on the brake state.
|
||||
if (mTailLightThread)
|
||||
mShapeInstance->setTimeScale(mTailLightThread, mBraking? 1.0f : -1.0f);
|
||||
|
||||
// Update the steering animation: sequence time 0 is full right,
|
||||
// and time 0.5 is straight ahead.
|
||||
if (mSteeringThread) {
|
||||
F32 t = (mSteering.x * mFabs(mSteering.x)) / mDataBlock->maxSteeringAngle;
|
||||
mShapeInstance->setPos(mSteeringThread, 0.5 - t * 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue