Kraken Logo

Kraken Engine

DocumentationGuidesShowcaseCommunity
Ctrl
K
Navigating the Docs
Building Docs
Overview
Anchor
AnimationController
Audio
Batcher
Body
Camera
Capsule
CastHit
CharacterBody
Circle
Collision
Color
DistanceJoint
Effect
Event
FilterJoint
Flip (Texture)
Font
ImageLayer
InputAction
Joint
Layer
Line
Map
MapObject
Mask
MotorJoint
MouseJoint
ObjectGroup
Orchestrator
PixelArray
PolarCoordinate
Polygon
PrismaticJoint
Rect
RevoluteJoint
RigidBody
Sample
Sampler
Shader
SheetStrip
StaticBody
Stream
Style
Terrain (TileSet)
Text
TextProperties
Texture
Tile (TileLayer)
Tile (TileSet)
TileLayer
TileResult (TileLayer)
TileSet
Timer
Transform
Tween
Vec2
Vertex
WeldJoint
WheelJoint
World

Built bydurkisneer1.Kraken Engine is open source and available onGitHub.

  1. Docs
  2. Classes
  3. Distance Joint

DistanceJoint

A joint that constrains two bodies to maintain a fixed distance between their anchor points. Access via the 'physics' submodule.

Experimental API:

The physics submodule is an experimental and new API that is highly susceptible to breaking changes in the future.

Inherits from Joint.

Properties


NameDescriptionType
lengthThe rest length of the joint.float
spring_enabledWhether the spring is enabled.bool
spring_hzThe spring frequency in Hertz.float
spring_damping_ratioThe spring damping ratio.float
limit_enabledWhether the length limits are enabled.bool
motor_enabledWhether the motor is enabled.bool
motor_speedThe target motor speed.float
max_motor_forceThe maximum motor force.float
min_lengthThe minimum length limit.float
max_lengthThe maximum length limit.float
current_lengthThe current length between the anchors.float
motor_forceThe current motor force.float

Methods


Set Length Range

set_length_range(min_length: float, max_length: float) → Noneset_length_range(min_length: float, max_length: float) → None

Set the minimum and maximum length limits.

Args

  • min_length : The minimum length.
  • max_length : The maximum length.
PreviousColor
NextEffect

On this page

PropertiesMethodsSet Length Range