UDN
Search public documentation

PhysicsDampingAndFriction
Licensees can log in.

Red links require licensee log in.

Interested in the Unreal engine?
Check out the licensing page.

Questions about UDN itself?
Contact the UDN Staff

Physics Damping And Friction

Document Summary: Explanation of how to use various damping and friction properties exposed by the physics system.

Document Changelog: Created by James Golding.

Overview

There are three main settings that can be used to slow down objects in a physical world - joint drive, damping in the PhysicalMaterial and RigidBodyDamping in the PhysicsVolume.

PhysicalMaterial Damping

This can be thought of like the air resistance that is applied to a body. A force is applied to a body to try and slow it down, and the strength of the force is proportional to the speed that the object is moving. There is a separate setting for linear and angular damping, so you can control how much it will try and resist translation and rotation movement. One place where you might want to use this would be a swinging chandalier that you did not want to swing forever. You may not want to use this for a door though, as a lot of the friction on a real door is due to it's hinge. If you set a high damping on the door's PhysicalMaterial and then broke it off the hinge, it would still have that damping applied to it which may look odd.

Joint Drive

To simulate 'friction' within a joint, you can use the joint drive properties in the RB_ConstraintInstance (you can get to these properties in PhAT by selecting the joint and pressing the 'I' key or the 'i' icon on the toolbar). First you want to turn on the appropriate bTwistVelocityDrive or bSwingVelocityDrive drive, set the desired angular velocity to zero and modify the AngularDriveForceLimit to control how much friction is in the joint. You can find more information on this on the PhysicsConstraintReference page.

The key thing here is that the damping is applied between two jointed object. Imagine two objects jointed together, but then thrown through space. If you used PhysicalMaterial damping here, it would slow down how quickly the pair of objects would move through the air, when what you really want is to modify how they move relative to each other. That is why Joint Drive is the right thing to use in this case.

PhysicsVolume RigidBodyDamping

Sometimes you want to apply damping or a force to objects only in a certain area of your level. To do this you would use a PhysicsVolume. The ZoneVelocity property of a PhysicsVolume is the desired velocity that objects in that volume should achieve. You can think of this as the speed of a river or wind-tunnel in that area. You can then modify the RigidBodyDamping property to control how strongly a physics body will try and achieve that velocity when in the volume. Setting a zero ZoneVelocity and a high RigidBodyDamping can make the volume act like jelly. Setting a horizontal ZoneVelocity and a moderate RigidBodyDamping can make it act like a flowing river of water.