PhysicsBody Body1 { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Body1 property of the PhysicsJoint class represents the source physics body to which this joint is attached. This property is essential for defining the first body in a joint connection, allowing the joint to apply constraints and forces between two physics bodies.

Usage

To use the Body1 property, you need to have an instance of a PhysicsJoint. You can then access the Body1 property to get or set the PhysicsBody that serves as the source body for the joint.

Example

// Assuming you have a PhysicsJoint instance named 'joint'
PhysicsBody sourceBody = joint.Body1;

// You can also set the Body1 property if needed
joint.Body1 = new PhysicsBody();