Merge pull request #5835 from ekliot/vendor-box2d-bindings

`vendor:box2d` add `targetAngle` to `RevoluteJoint` struct/procs
This commit is contained in:
Jeroen van Rijn
2025-10-21 19:56:16 +02:00
committed by GitHub
2 changed files with 10 additions and 0 deletions

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 ---

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,