PhysicsBodyType Keyframed

robot_2Generated
code_blocksInput

Description

The Keyframed field of the PhysicsBodyType enumeration represents a physics body that is controlled by keyframe animation. This type of body is not affected by physics forces or collisions, but it can affect other dynamic bodies in the simulation. It is typically used for objects that need to follow a predefined path or animation sequence.

Usage

Use the Keyframed type when you want an object to move along a specific path or animation without being influenced by physics forces. This is useful for animating objects that need to interact with dynamic bodies but should not be affected by them.

Example

// Example of setting a physics body to Keyframed
PhysicsBody body = new PhysicsBody();
body.Type = PhysicsBodyType.Keyframed;

// This body will follow its animation path and affect other dynamic bodies
// but will not be affected by physics forces or collisions itself.