Page MenuHomeFeedback Tracker

SetDamage applies physX force from above model center
New, NormalPublic

Description

This is an issue I noticed while working on a script that slowly applies damage to a vehicle within an area.
setDamage for whatever reason seems to apply an amount of force from directly above the vehicle the damage is being applied to. This causes tanks/car suspension to compress and static weapons and the likes to clip through the ground and bounce.

This issue does not occur with similar commands (setHitpointDamage etc) and only happens with setDamage

While it's not super noticeble when the command is run once, if run multiple times it's very noticeble as seen in this recording:
https://www.youtube.com/watch?v=XkdlZTQbkZM

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce

Reproduction mission:

  1. Load reproduction mission
  2. Launch the mission in single player from the editor
  3. Note how the tanks suspension is constantly compressing (bouncing)
  4. The vehicle can be changed to any type (at least those that are simulated) and will have similar results, even things such as Ammo boxes will start to bounce around.
Additional Information

The function running in the test mission is simply:

[this] spawn {
_obj = _this # 0;
waituntil {_dmg = damage _obj; _obj setdamage (_dmg + 0.01); sleep 1; !(alive _obj)};
};

Event Timeline