JointToBody

class JointToBody(body1: Body, body2: Body, jointLength: Double, jointConstant: Double, dampening: Double, canGoSlack: Boolean, offset1: Vec2, offset2: Vec2) : Joint

Class for a joint between two bodies.

Constructors

Link copied to clipboard
fun JointToBody(body1: Body, body2: Body, jointLength: Double, jointConstant: Double, dampening: Double, canGoSlack: Boolean, offset1: Vec2, offset2: Vec2)

Functions

Link copied to clipboard
open override fun applyTension()

Applies tension to the two bodies.

Link copied to clipboard
open override fun calculateTension(): Double

Calculates tension between the two attachment points of the joints bodies.

Link copied to clipboard
open override fun rateOfChangeOfExtension(): Double

Determines the rate of change between two objects.

Properties

Link copied to clipboard
var object1AttachmentPoint: Vec2
Link copied to clipboard
var object2AttachmentPoint: Vec2