Vector3 Velocity { get; set; }

robot_2Generated
code_blocksInput

Description

The Velocity property of the PhysicsGroup class is used to set the velocity of all physics bodies within the group. This property directly affects the Velocity of each PhysicsBody in the group, allowing for uniform motion control across multiple bodies.

Usage

To use the Velocity property, simply assign a Vector3 value to it. This will set the velocity for all bodies in the PhysicsGroup. For example, if you want to move all bodies in the group in a specific direction at a certain speed, you can set the Velocity property to a Vector3 representing that direction and speed.

Example

// Example of setting the velocity for a PhysicsGroup
PhysicsGroup myPhysicsGroup = new PhysicsGroup();

// Set the velocity to move all bodies in the group along the X-axis at a speed of 10 units per second
myPhysicsGroup.Velocity = new Vector3(10, 0, 0);