RigidBody

Enabled rigid body physics to be applied on a PhysicObject. The programming interface below allows you to control a variety of properties that will affect the behaviors of the RigidBody.

It also contains multiple helpers and functions to be able to control the physics movement of an object; create and attach different types of RigidConstraint to your rigid body to make your physics World more lifelike.

See Also

Static Variables


Name Description
physicobject Parent PhysicObject where the RigidBody component is stored.
rigidconstraint_count Current amount of RigidConstraint attached to the current RigidBody.

Variables


Name Description
default_state The default ActivationState the RigidBody after it is created.
adaptation_method The default AdaptationMethod to use for AdaptiveMesh located on the active RigidBody.
kinematic Determine whether or not the RigidBody transformation should be controlled by the application.
disable_contact_response Force the RigidBody to act as a ghost and stop responding to collision.
remove_broken_constraints Force the system to remove RigidConstraint as soon as the become broken.
mass Control the mass of the active RigidBody.
form_factor Control the form factor of the inertia tensor.
linear_factor Linear factors allow you to specify the influence of movements for each axis.
angular_factor Angular factors works basically the same way as is linear counterpart at the exception that it is applied to the rotational part of the RigidBody transformation.
anisotropic_friction Control the internal friction damping by altering the value for each axis.
linear_damping Specify the linear damping factor for each axis.
angular_damping Controls the angular damping factor for each rotational axis.
linear_sleeping_threshold Linear sleeping threshold value in seconds; where 1.0 = 1 sec.
angular_sleeping_threshold Same as linear_sleeping_threshold but control the angular sleeping threshold value.
contact_processing_threshold The period of time (where 1.0 = 1 sec.) a contact point should still be considered as alive before it gets destroyed.
motion_threshold Interpolation factor that will be use to interpolate the motion between the previous and current frame.
swept_sphere_radius Radius of the swept sphere to use for continuous collision detection.
gravity Custom gravity vector to use for the active RigidBody.
force Control the amount of force that should be applied on the RigidBody.
torque Control the how much rotational torque should be applied on the RigidBody.
linear_velocity Set/get the amount of linear velocity is currently applied on the RigidBody.
angular_velocity Set/get how much angular velocity is currently applied on the RigidBody.

Functions


Name Description
Activate Activate the RigidBody.
Deactivate Force the physic engine to deactivate the RigidBody.
WantsDeactivation Hint the physic engine that the RigidBody should be marked for deactivation.
DisableDeactivation Force the physic engine to never deactivate the RigidBody.
DisableSimulation Remove the RigidBody from the physics simulation.
GetActivationState Return the current ActivationState of the RigidBody.
ClearForces Set all forces back to 0; wich will force the RigidBody to stop moving instantenously.
ApplyForce Apply a certain amount of force to the active RigidBody.
ApplyImpulse Apply a specific amount of impulse on the RigidBody.
ApplyTorqueImpulse Apply a certain amount of torque impulse on the RigidBody.
ApplyCentralImpulse Apply a specific amount of impulse to the center of the RigidBody.
ClearVelocities Clear out all velocity data (linear and angular).
GetNumConstraintLinks Return how many constraints are connected to the current RigidBody.
AddConstraint Create a new RigidConstraint and attach it to the active RigidBody.
AddBallConstraint Helper function to create and attach a BallConstraint to the current RigidBody.
AddHingeConstraint Helper function to create and attach a HingeConstraint to the current RigidBody.
AddTwistConstraint Helper function to create and attach a TwistConstraint to the current RigidBody.
AddSliderConstraint Helper function to create and attach a SliderConstraint to the current RigidBody.
AddGenericConstraint Helper function to create and attach a GenericConstraint to the current RigidBody.
AddFixedConstraint Helper function to create and attach a FixedConstraint to the current RigidBody.
GetConstraint Retrieve the reference of a specific RigidConstraint attached to the current RigidBody using its name as key.
GetConstraintAt Retrieve the reference of a RigidConstraint using its internal index as key.
GetConstraintIndex Return the internal index of a specific RigidConstraint reference.
RemoveConstraint Remove a specific RigidConstraint attached to the active RigidBody.
RemoveConstraintAt Remove an existing RigidConstraint by index.




NRG - API 2022.4.384543 - Fri Nov 4 2022
Copyright © 2022 nrgcore.com. All Rights Reserved. Terms of Service - Privacy Policy - EULA