FrictionJoint

Top-down friction between 2 bodies More...

Import Statement: import
Inherits:

Joint

Properties

Methods

Detailed Description

This is used for top-down friction. It provides 2D translational friction and angular friction.

This way, the relational linear and angular velocity between two bodies can be slowed down.

Property Documentation

localAnchorA : point

The local anchor point relative to the Joint::bodyA center in pixels.

The default is (0, 0), which means the center of Joint::bodyA.


localAnchorB : point

The local anchor point relative to the Joint::bodyB center in pixels.

The default is (0, 0), which means the center of Joint::bodyB.


maxForce : real

The maximum friction force, in kg*pixels/s^2.


maxTorque : real

The maximum friction torque, in kg*pixels^2/s^2.


Method Documentation

point getReactionForce(real inv_dt)

Returns the reaction force, in kg*pixels/second^2 for a timestep of length inv_dt, in seconds.

For the Parameter inv_dt, World::timeStep can be used.


real getReactionTorque(real inv_dt)

Returns the reaction torque, in clockwise kg*pixels^2/second^2 for a timestep of length inv_dt, in seconds.

For the Parameter inv_dt, World::timeStep can be used.


Videos

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support