mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
camerashake first person weapon recoil fix
This commit is contained in:
parent
8f94614a6e
commit
da34c84df9
1 changed files with 2 additions and 1 deletions
|
|
@ -3397,8 +3397,9 @@ void ShapeBase::shakeCamera( U32 imageSlot )
|
|||
{
|
||||
VectorF diff;
|
||||
getMuzzlePoint(imageSlot, &diff);
|
||||
diff = obj->getPosition() - diff;
|
||||
diff = obj->getPosition() - getPosition(); //andrewmac's mystery camerashake fix
|
||||
F32 dist = diff.len();
|
||||
if ( dist == 0.0f ) dist = 1.0f; //andrewmac's mystery camerashake fix
|
||||
if (dist < imageData->camShakeRadius)
|
||||
{
|
||||
CameraShake *camShake = new CameraShake;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue