Skip to content

CreatePhysicsHingeConstraint

Narta Xaymar Dirks edited this page Nov 17, 2026 · 1 revision
BlitzLLVM

CreatePhysicsHingeConstraint 〔BlitzLLVM〕

CreatePhysicsHingeConstraint:Int32 a:Int32, b:Int32, x:Float32, y:Float32, z:Float32, axis_x:Float32, axis_y:Float32, axis_z:Float32
Parameter Mode Type Default Description
a In Int32 required The first body (a physics body entity). Limits, angles, speeds and positions of the constraint are those of this body relative to the second.
b In Int32 required The second body, or 0 to hold the first body against the world.
x In Float32 required A point on the axis, x.
y In Float32 required A point on the axis, y.
z In Float32 required A point on the axis, z.
axis_x In Float32 required The direction of the axis, x. It does not have to be of length 1, but not 0.
axis_y In Float32 required The direction of the axis, y.
axis_z In Float32 required The direction of the axis, z.

Returns: The handle of the constraint.

Description

〔BlitzLLVM〕 This command does not exist in the original Blitz products. BlitzLLVM adds it.

Makes two bodies share a point and turn around one axis only, like a door or a wheel. Set the range with PhysicsConstraintLimits and drive it with PhysicsConstraintMotor. Angles are in degrees and follow the right hand rule around the axis, as given in the world.

A constraint needs bodies in the same physics world and at least one body that can move (dynamic). It is gone when either body is freed or the world is freed. All points and directions are in the world. Free it with FreePhysicsConstraint.

Differences

  • The original has no such command. This is an extension; programs that use it do not compile with the original Blitz3D.

Related Commands

CreatePhysicsBody 〔BlitzLLVM〕, CreatePhysicsBodyFromEntity 〔BlitzLLVM〕, CreatePhysicsConeConstraint 〔BlitzLLVM〕, CreatePhysicsDistanceConstraint 〔BlitzLLVM〕, CreatePhysicsFixedConstraint 〔BlitzLLVM〕, CreatePhysicsPointConstraint 〔BlitzLLVM〕, CreatePhysicsSliderConstraint 〔BlitzLLVM〕, CreatePhysicsWorld 〔BlitzLLVM〕

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally