projectile augs

use impactforce to applyimpulse for stock physics too
add an optional explodeOnTmeout
for nonballistic projectiles, track if they hit something before their armingdelay is up, and delete them next simulation cycle
This commit is contained in:
AzaezelX 2025-04-16 13:08:39 -05:00
parent 75e23e85ea
commit f0c0f3c42c
2 changed files with 33 additions and 8 deletions

View file

@ -87,9 +87,9 @@ public:
/// Force imparted on a hit object.
F32 impactForce;
bool mExplodeOnTmeout;
/// Should it arc?
bool isBallistic;
/// How HIGH should it bounce (parallel to normal), [0,1]
F32 bounceElasticity;
/// How much momentum should be lost when it bounces (perpendicular to normal), [0,1]
@ -274,7 +274,7 @@ protected:
LightInfo *mLight;
LightState mLightState;
bool mHasHit;
bool mHasExploded; ///< Prevent rendering, lighting, and duplicate explosions.
F32 mFadeValue; ///< set in processTick, interpolation between fadeDelay and lifetime
///< in data block