UDK 3 and Rigid Body Physics Headache

I have been experimenting with UDK for the first time, and wanted to share my experiences with basic physics.

Problem: Add a static mesh Actor, start the level, and it's just floating mid air until you shoot it.
Solution: Convert to KActor to get the 'Wake On Level Start' property, or roll your own UnrealScript to call .WakeRigidBody();

Problem: Start the level, watch the KActor placed in the sky fall down through the floor and disappear.
Solution: The default map 'Kill Z' is stupidly set exactly level with the floor. The falling velocity makes the KActor briefly go lower than the floor, causing it it to be destroyed before the collision physics take effect. View the World Properties and set the Kill Zone to something like -9999.

Problem: You want to prevent players from being able wake scripted physics events or use Kismet to wake KActor physics.
Solution: Set wake on start, but set Physics=PHYS_None then use UnrealScript or Kismet to set Physics=PHYS_RigidBody on demand.

Problem: Create a StaticMeshComponent class that extends Actor, you cannot walk through it, but it will Move() through you.
Solution: Along with bCollideActors=true and bBlockActors=true, you must also have CollisionComponent=YourMeshName for it to collide properly.

Leave a Reply

Your email address will not be published. Required fields are marked *