vendor:box2d add targetAngle to RevoluteJoint struct/procs

This commit is contained in:
ekliot
2025-10-21 14:28:28 +01:00
parent 9df81bed9f
commit 0e49ee8db7
2 changed files with 10 additions and 0 deletions
+6
View File
@@ -1562,6 +1562,12 @@ foreign lib {
// Get the revolute joint spring damping ratio, non-dimensional
RevoluteJoint_GetSpringDampingRatio :: proc(jointId: JointId) -> f32 ---
// Set the revolute joint spring target angle, radians
RevoluteJoint_SetTargetAngle :: proc(jointId: JointId, angle: f32) ---
// Get the revolute joint spring target angle, radians
RevoluteJoint_GetTargetAngle :: proc(jointId: JointId) -> f32 ---
// Get the revolute joint current angle in radians relative to the reference angle
// @see b2RevoluteJointDef::referenceAngle
RevoluteJoint_GetAngle :: proc(jointId: JointId) -> f32 ---
+4
View File
@@ -727,6 +727,10 @@ RevoluteJointDef :: struct {
// This defines the zero angle for the joint limit.
referenceAngle: f32,
// The target angle for the joint in radians. The spring-damper will drive
// to this angle.
targetAngle: f32,
// Enable a rotational spring on the revolute hinge axis
enableSpring: bool,