mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
move reference point for camShake to player's bounding box center
This commit is contained in:
parent
308063a006
commit
5d52864c9f
|
|
@ -897,7 +897,7 @@ bool Explosion::onAdd()
|
|||
|
||||
if( applyShake && obj )
|
||||
{
|
||||
VectorF diff = obj->getPosition() - getPosition();
|
||||
VectorF diff = obj->getWorldBox().getCenter() - getPosition(); //changed to use player's center instead of origin, it is more accurate
|
||||
F32 dist = diff.len();
|
||||
if( dist < mDataBlock->camShakeRadius )
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue