Difference between revisions of "R3d.FixedJoint"

From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight")
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
Line 6: Line 6:
 
<syntaxhighlight lang="lua">
 
<syntaxhighlight lang="lua">
 
r3d.FixedJoint
 
r3d.FixedJoint
</source>
+
</syntaxhighlight>
  
 
Now, it is possible to create the actual joint in the dynamics world using the DynamicsWorld::createJoint() method.
 
Now, it is possible to create the actual joint in the dynamics world using the DynamicsWorld::createJoint() method.
Line 14: Line 14:
 
=== Example ===
 
=== Example ===
 
<syntaxhighlight lang="lua">
 
<syntaxhighlight lang="lua">
</source>
+
</syntaxhighlight>
  
 
{{R3d.Joint}}
 
{{R3d.Joint}}

Latest revision as of 14:31, 13 July 2023

Available since: Gideros 2019.10
Class: R3d.Joint

Description

The FixedJoint class describes a fixed joint between two bodies. In a fixed joint, there is no degree of freedom, the bodies are not allowed to translate or rotate with respect to each other. In order to create a fixed joint, you simply need to specify an anchor point (in world-space) to create the FixedJointInfo object.

r3d.FixedJoint

Now, it is possible to create the actual joint in the dynamics world using the DynamicsWorld::createJoint() method.

Note that this method will also return a pointer to the FixedJoint object that has been created internally. You will then be able to use that pointer to change properties of the joint and also to destroy it at the end.

Example