ObjectTemplate.AngleMod

From Pilot_51's Wiki
Jump to navigation Jump to search

MDT description

AngleMod is used to modify the collision damage received by an object. This value is set inside the defending object's Objects.con file, similar to SpeedMod. However, most objects do not have this value set, so have a default of 0; only planes have this value set, and always to 1. The actual expression used is:


CollisionAngleMod = AngleMod + (1 - AngleMod) * sine( cosine( angle ) * 90 degrees )

This looks complex, but because the AngleMod is always either 0 or 1, one part or the other of this expression goes away when evaluated. In theory you could set AngleMod to some other value. The angle is the angle of collision between the two objects. Specifically, it is the direction of the attacker compared to the normal of the surface hit of the defender. 0 degrees is head-on. So, for airplanes the final value is simply 1, i.e. the angle an object collides with the plane does not matter, the plane will take full damage. For other objects, this term falls off with angle, e.g. 0 degrees gives 1.0, 30 degrees gives 0.978, 60 degrees gives 0.707, 80 degrees gives 0.270, 90 degrees gives 0.0. So hitting at anything but a glancing blow does nearly full damage.

See the Damage Tutorial for more information.
Source and more details

Additional Description