float Frequency

robot_2Generated
code_blocksInput

Description

The Frequency field represents the stiffness of the spring in the PhysicsSpring struct. It is a single-precision floating-point value that determines how quickly the spring oscillates. A higher frequency results in a stiffer spring, which oscillates more rapidly.

Usage

To use the Frequency field, you need to create an instance of the PhysicsSpring struct and set the Frequency value to control the stiffness of the spring in your physics simulation. This is particularly useful when configuring joints such as FixedJoint in the physics engine.

Example

// Example of setting the Frequency field in a PhysicsSpring instance
PhysicsSpring springSettings = new PhysicsSpring();
springSettings.Frequency = 5.0f; // Set the spring frequency to 5 Hz

// Use springSettings in a physics joint configuration
FixedJoint joint = new FixedJoint();
joint.Spring = springSettings;