mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 00:24:40 +00:00
move reference point for camShake to player's bounding box center
This commit is contained in:
parent
308063a006
commit
5d52864c9f
1 changed files with 1 additions and 1 deletions
|
|
@ -897,7 +897,7 @@ bool Explosion::onAdd()
|
||||||
|
|
||||||
if( applyShake && obj )
|
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();
|
F32 dist = diff.len();
|
||||||
if( dist < mDataBlock->camShakeRadius )
|
if( dist < mDataBlock->camShakeRadius )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue