mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 00:54:54 +00:00
Merge pull request #2001 from pacomont/Let's_appling_Camera_FX_when_mount_on_driver_position
Why not apply Camera FX on vehicle driver position?
This commit is contained in:
commit
726790bacf
1 changed files with 73 additions and 71 deletions
|
|
@ -1016,11 +1016,12 @@ void Vehicle::getCameraTransform(F32* pos,MatrixF* mat)
|
||||||
if (isServerObject() && mShapeInstance)
|
if (isServerObject() && mShapeInstance)
|
||||||
mShapeInstance->animateNodeSubtrees(true);
|
mShapeInstance->animateNodeSubtrees(true);
|
||||||
|
|
||||||
if (*pos == 0) {
|
if (*pos == 0)
|
||||||
|
{
|
||||||
getRenderEyeTransform(mat);
|
getRenderEyeTransform(mat);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
// Get the shape's camera parameters.
|
// Get the shape's camera parameters.
|
||||||
F32 min, max;
|
F32 min, max;
|
||||||
MatrixF rot;
|
MatrixF rot;
|
||||||
|
|
@ -1095,6 +1096,7 @@ void Vehicle::getCameraTransform(F32* pos,MatrixF* mat)
|
||||||
if (isMounted())
|
if (isMounted())
|
||||||
getObjectMount()->enableCollision();
|
getObjectMount()->enableCollision();
|
||||||
enableCollision();
|
enableCollision();
|
||||||
|
}
|
||||||
|
|
||||||
// Apply Camera FX.
|
// Apply Camera FX.
|
||||||
mat->mul( gCamFXMgr.getTrans() );
|
mat->mul( gCamFXMgr.getTrans() );
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue