Vehicle::setDamage
Apply damage to vehicle at a location. Location is relative to vehicle model (not world).
Radius of effect damage applied in a sphere at impact location
It is enough to use x,y,z values from -1 to 1.
p6 should be true, with false it does not taking in account offset values and all damage is applied to rear left part of the vehicle.
Good values for radius could be from 25 to 200, for damage 50-200.
You need to apply delay if you want to call setDamage couple times in a row. Typically 10ms is enough.
Syntax
vehicle.setDamage(xOffset, yOffset, zOffset, damage, radius, p6);
Required Arguments
- xOffset: float
- yOffset: float
- zOffset: float
- damage: float
- radius: float
- focusOnModel: Boolean
Return value
- Undefined
Example
// todo