Physic joints are pivotal for creating dynamic and interactive connections between objects in your app. They enable you to simulate real-world interactions, such as constraints, hinges, and springs, adding realism and complexity to your app´s physics engine. By utilizing physic joints, you can create intricate behaviors, like swinging pendulums, sliding doors, and interconnected objects. These joints offer a range of configurations, allowing you to fine-tune the behavior of connected objects. Whether you´re building a game with realistic physics or adding interactive elements to your app, physic joints provide the tools to create engaging and immersive experiences.
Physic Joint´s Types
Pivot Joint

You can download the project from the following link:
Class_Rar_0__46.rar
You can observe the project in motion here:
During design mode, you can assign the following properties and events to Pivot Joints:

- Usage: The pivot joint allows two bodies to rotate around a specific point.
- Properties:
- jointType: pivot
- image_NODE_1: First image node to connect.
- image_NODE_2: Second image node to connect.
- connect_anchor: Anchor point around which the bodies will rotate. (Default: (0,0))
- isMotorEnabled: Enables or disables the motor. (Default: false)
- motorSpeed: The motor speed in degrees per second. (Default: 100)
- maxMotorTorque: The maximum torque the motor can apply. (Default: 1500)
- isLimitEnabled: Enables or disables the rotation limits. (Default: false)
- setRotation_negLimit: The negative rotation limit in degrees. (Default: -20)
- setRotation_posLimit: The positive rotation limit in degrees. (Default: 20)
- Explanation: The pivot joint allows two connected bodies to rotate around a specific anchor point. The motor can be used to rotate the bodies, and limits can be set to restrict the rotation within a certain range.
Distance Joint

You can download the project from the following link:
Class_Rar_1__46.rar
You can observe the project in motion here:
During design mode, you can assign the following properties and events to Distance Joints:

- Usage: The distance joint keeps two points on two bodies at a fixed distance from each other.
- Properties:
- jointType: distance
- image_NODE_1: First image node to connect.
- image_NODE_2: Second image node to connect.
- anchor_object1: Anchor object on the first image node.
- anchor_object2: Anchor object on the second image node.
- anchor_centered1: Whether the anchor point on the first image node is centered.
- anchor_centered2: Whether the anchor point on the second image node is centered.
- dampingRatio_0_to_1: The damping ratio for the connection. (Default: 0.5)
- frequency_hz: The frequency of the connection in hertz. (Default: 100)
- length: The initial length of the connection.
- Explanation: The distance joint keeps two points on two bodies at a fixed distance from each other. It allows some degree of freedom in movement, controlled by the damping ratio and frequency parameters.
Piston Joint

You can download the project from the following link:
Class_Rar_2__46.rar
You can observe the project in motion here:
During design mode, you can assign the following properties and events to Piston Joints:

- Usage: The piston joint allows for relative translation of two bodies along a specified axis.
- Properties:
- jointType: piston
- image_NODE_1: First image node to connect.
- image_NODE_2: Second image node to connect.
- motion_axis: The axis along which relative motion is allowed. (Default: 0)
- custom_motion_axis_x_y: Custom x and y components for the motion axis.
- isMotorEnabled: Enables or disables the motor. (Default: false)
- motorSpeed: The motor speed in units per second. (Default: -100)
- maxMotorForce: The maximum force the motor can apply. (Default: 1000)
- isLimitEnabled: Enables or disables the translation limits. (Default: false)
- negative_Limit: The negative translation limit. (Default: -40)
- positive_Limit: The positive translation limit. (Default: 120)
- Explanation: The piston joint allows for relative translation of two bodies along a specified axis. It can be used to create mechanisms that slide or move along a straight line.
Friction Joint

You can download the project from the following link:
Class_Rar_3__46.rar
You can observe the project in motion here:
During design mode, you can assign the following properties and events to Friction Joints:

- Usage: The friction joint applies a friction force to two bodies to prevent relative motion.
- Properties:
- jointType: friction
- image_NODE_1: First image node to connect.
- image_NODE_2: Second image node to connect.
- connect_anchor: Anchor point around which the friction acts. (Default: (0,0))
- maxForce: The maximum friction force. (Default: 0.1)
- maxTorque: The maximum friction torque. (Default: 0.1)
- Explanation: The friction joint applies a friction force to two bodies to prevent relative motion. It is useful for simulating surfaces with friction, such as the ground.
Weld Joint

You can download the project from the following link:
Class_Rar_4__46.rar
You can observe the project in motion here:
During design mode, you can assign the following properties and events to Weld Joints:

- Usage: The weld joint constrains two bodies to share the same position and orientation.
- Properties:
- jointType: weld
- image_NODE_1: First image node to connect.
- image_NODE_2: Second image node to connect.
- anchor_object1: Anchor object for the first body.
- anchor_object2: Anchor object for the second body.
- anchor_centered1: Whether the anchor for the first body is centered. (Default: true)
- anchor_centered2: Whether the anchor for the second body is centered. (Default: true)
- frequency_hz: The frequency in hertz. (Default: 100)
- dampingRatio_0_to_1: The damping ratio. (Default: 0.5)
- Explanation: The weld joint constrains two bodies to share the same position and orientation. It is often used to create rigid connections between objects.
Wheel Joint

You can download the project from the following link:
Class_Rar_5__46.rar
You can observe the project in motion here:
During design mode, you can assign the following properties and events to Wheel Joints:

- Usage: The wheel joint simulates a vehicle wheel suspension.
- Properties:
- jointType: wheel
- image_NODE_1: First image node to connect.
- image_NODE_2: Second image node to connect.
- motion_axis: The axis along which the suspension moves. (Default: 0)
- custom_motion_axis_x_y: Custom x and y components for the motion axis.
- springDampingRatio_0_to_1: The spring damping ratio. (Default: 0.5)
- springFrequency: The spring frequency in hertz. (Default: 100)
- Explanation: The wheel joint simulates a vehicle wheel suspension. It can be used to create realistic vehicle physics, such as car suspensions.
Pulley Joint

You can download the project from the following link:
Class_Rar_6__46.rar
You can observe the project in motion here:
During design mode, you can assign the following properties and events to Pulley Joints:

- Usage: The pulley joint simulates a pulley system.
- Properties:
- jointType: pulley
- image_NODE_1: First image node to connect.
- anchor_object1: Anchor object for the first body.
- anchor_screen1: Anchor point in screen coordinates for the first body.
- image_NODE_2: Second image node to connect.
- anchor_object2: Anchor object for the second body.
- anchor_screen2: Anchor point in screen coordinates for the second body.
- anchor_centered1: Whether the anchor for the first body is centered. (Default: true)
- anchor_centered2: Whether the anchor for the second body is centered. (Default: true)
- ratio: The pulley ratio. (Default: 1)
- Explanation: The pulley joint simulates a pulley system, allowing bodies to be connected and move as if they are connected by a pulley.
Touch Joint

You can download the project from the following link:
Class_Rar_7__46.rar
You can observe the project in motion here:
During design mode, you can assign the following properties and events to Touch Joints:

- Usage: The touch joint allows bodies to be dragged around by touching them.
- Properties:
- jointType: touch
- image_NODE_1: Image node to connect.
- anchor_screen1: Anchor point in screen coordinates.
- connect_anchor: The anchor on the body to connect to.
- anchor_centered: Whether the anchor is centered. (Default: true)
- frequency_hz: The frequency in hertz. (Default: 100)
- dampingRatio_0_to_1: The damping ratio. (Default: 1)
- maxForce: The maximum force applied to move the body. (Default: 6)
- Explanation: The touch joint allows bodies to be dragged around by touching them, useful for creating interactive physics-based interfaces.
Rope Joint

You can download the project from the following link:
Class_Rar_8__46.rar
You can observe the project in motion here:
During design mode, you can assign the following properties and events to Rope Joints:

- Usage: The rope joint simulates a rope or cable between two bodies.
- Properties:
- jointType: rope
- image_NODE_1: First image node to connect.
- image_NODE_2: Second image node to connect.
- anchor_object1: Anchor object for the first body.
- anchor_object2: Anchor object for the second body.
- anchor_centered1: Whether the anchor for the first body is centered. (Default: true)
- anchor_centered2: Whether the anchor for the second body is centered. (Default: true)
- maxLength: The maximum length of the rope. (Default: 150)
- Explanation: The rope joint simulates a rope or cable between two bodies, allowing them to move as if connected by a flexible rope.
|