struct

Flock::Collision::Joint3D

Inherits Struct < Value < Object

A 3D constraint between two bodies (JointType is shared with 2D). Anchors are local; Pin is a point-to-point (ball) joint. Held in Physics3D.joints.

Constructors

distance(a : Flock::Entity, b : Flock::Entity, length : Number, anchor_a : Flock::Vec3 = Flock::Vec3.new, anchor_b : Flock::Vec3 = Flock::Vec3.new) : Joint3D
Source
new(a : Flock::Entity, b : Flock::Entity, type : Flock::Collision::JointType, anchor_a : Flock::Vec3 = Flock::Vec3.new, anchor_b : Flock::Vec3 = Flock::Vec3.new, length : Float32 = 0.0_f32, stiffness : Float32 = 100.0_f32, damping : Float32 = 1.0_f32, min_length : Float32 = 0.0_f32, max_length : Float32 = 0.0_f32)
Source
pin(a : Flock::Entity, b : Flock::Entity, anchor_a : Flock::Vec3 = Flock::Vec3.new, anchor_b : Flock::Vec3 = Flock::Vec3.new) : Joint3D
Source
rope(a : Flock::Entity, b : Flock::Entity, max_length : Number, min_length : Number = 0.0, anchor_a : Flock::Vec3 = Flock::Vec3.new, anchor_b : Flock::Vec3 = Flock::Vec3.new) : Joint3D

A rope: anchors may come closer than max_length but never exceed it.

Source
spring(a : Flock::Entity, b : Flock::Entity, length : Number, stiffness : Number = 100.0, damping : Number = 1.0, anchor_a : Flock::Vec3 = Flock::Vec3.new, anchor_b : Flock::Vec3 = Flock::Vec3.new) : Joint3D
Source

Instance methods

a=(a : Flock::Entity)
Source
anchor_a
Source
anchor_a=(anchor_a : Flock::Vec3)
Source
anchor_b
Source
anchor_b=(anchor_b : Flock::Vec3)
Source
b=(b : Flock::Entity)
Source
damping
Source
damping=(damping : Float32)
Source
length
Source
length=(length : Float32)
Source
max_length
Source
max_length=(max_length : Float32)
Source
min_length
Source
min_length=(min_length : Float32)
Source
stiffness
Source
stiffness=(stiffness : Float32)
Source
type
Source
type=(type : JointType)
Source