Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!

MotorJoint

Keeps the relative translation and rotation between 2 bodies constant. More...

Import Statement: import Felgo 3.0
Inherits:

Joint

Properties

Detailed Description

A motor joint is used to control the relative motion between two bodies. It is similar to DistanceJoint, with fixed rotation between the 2 bodies.

A typical usage is to control the movement of a dynamic body with respect to the ground.

Property Documentation

angularOffset : real

Defines the rotation from Joint::bodyA to Joint::bodyB, which will be fixed by this joint, in degrees.

If not set, the current rotation at the time of joint creation is used.


correctionFactor : real

Position correction factor between 0 and 1. Default value is 0.3.


linearOffset : point

Defines the direction from Joint::bodyA to Joint::bodyB, which will be fixed by this joint, in local coordinates, in pixels.

If not set, the current direction at the time of joint creation is used.


maxForce : real

The maximum force used to keep the joint's constraints, in kg*pixels/s^2.


maxTorque : real

The maximum torque used to keep the joint's constraints, in kg*pixels^2/s^2.