Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
1.1.0:q3-physics-joints [2023/11/02 13:07] – [Fixed Joint] admin1.1.0:q3-physics-joints [2023/11/02 13:27] (current) – [Motors] admin
Line 19: Line 19:
 |TQ3JointType.Buoyancy|Constrains two bodies to simulate floating bodies, f.e. on water surface.| |TQ3JointType.Buoyancy|Constrains two bodies to simulate floating bodies, f.e. on water surface.|
  
-=====Requirements =====+===== Requirements ===== 
 + 
 +==== Collider Prefab ==== 
 +For a working joint between two bodies, each one has to have a rigid body collider registered in the physics system. 
 +To do so, simply select your TGorillaPhysicsSystem component in the object inspector move to the "Colliders" property and add a collection item for each element. 
 + 
 +==== Body A attached To Body B ==== 
 + 
 +Each joint item provides a **ControlA** and **ControlB** property. Those properties need to be set, otherwise the joint will not work. 
 +For most of the joint types it is important to connect the bodies in correct relation. 
 +If you'd like to create a StiffSpring joint, you need to set the child element into ControlA and the parent, where the spring "hangs", into ControlB. 
 +=====Properties ===== 
 + 
 +^Name^ Description ^ 
 +|DisplayName|Defines a name to identify the joint by the user.| 
 +|Enabled|Activate or deactivate this joint on creation.| 
 +|JointType|Define the kind of connection between the two bodies by the TGorillaPhysicsJointType enumeration type: Fixed, BallAndSocket, Hinge, LimitedHinge, Prismatic, StiffSpring, Magnet or Buoyancy| 
 +|ControlA|Link the first joint control (CHILD) - this has to have a rigid body collider prefab!| 
 +|ControlB|Link the second joint control (PARENT/OWNER) - this has to have a rigid body collider prefab!| 
 +|Anchor|Some joint types need an anchor to be defined, f.e. hinge joints. Anchors can be used to define the linking position between two bodies relatively to the parent control (ControlB)| 
 +|AntiGravity|For some joint types it's helpful to apply a default anti gravity value, f.e. prismatic joints should stay in vertical position and only react on user input.| 
 +|Axis|Some joint types need an axis to be defined, f.e. hinge joints. The axis vector defines how the controls are able to move/rotate around on the basis of the joint. (1, 1, 1) means all directions are allowed, while (0, 1, 0) means, that only the y-axis movement/rotation is allowed| 
 +|BreakForce|Define the minimum power where the joint breaks by force. If a joint breaks, it will be deactivated for computation.| 
 +|BreakTorque|Define the minimum power where the joint breaks by torque. If a joint breaks, it will be deactivated for computation.| 
 +|Damping|Some joint types need a damping value to be defined, f.e. spring joints.| 
 +|Stiffness|Some joint types need a stiffness value to be defined, f.e. spring joints.| 
 +|RestLength|Some joint types need a rest-length value to be defined, f.e. spring joints.| 
 +|MaxValue|Define a maximum limit, f.e. used by prismatic joints| 
 +|MinValue|Define a minimum limit, f.e. used by prismatic joints| 
 +|Motor|TGorillaPhysicsMotorType: NoMotor, RotationMotor, AngularVelocityMotor, PositionMotor, LinearVelocityMotor, VelocityMotor| 
 +|MotorForce|If a motor type was selected, by the motor force value you can control the intensity of the motor computation.| 
 + 
 +=====Motors ===== 
 + 
 +Motors allow a joint to compute some automated behaviour during its handling. Sometimes you want to automatically rotate an object around its axis, like a paddle wheels of a ship floating on water by a buoyancy joint. 
 + 
 +^Type^Description^ 
 +|TGorillaPhysicsMotorType.NoMotor|Motor compuation deactivated.| 
 +|TGorillaPhysicsMotorType.RotationMotor|An rotation motor, continuesly applies the motor force value to the quaternion / rotation matrix information for a constant rotation.| 
 +|TGorillaPhysicsMotorType.AngularVelocityMotor|An angular motor, continuesly applies the motor force value to the angular velocity value. In case of a still object this will lead to faster and faster rotation.| 
 +|TGorillaPhysicsMotorType.PositionMotor|A linear motor, drives towards a position. A motorized prismatic joint that drives toward the specified relative target position. The axis is the direction of motion.| 
 +|TGorillaPhysicsMotorType.LinearVelocityMotor|A linear motor, drives towards a velocity. A motorized prismatic joint that drives to a constant target relative velocity. The axis is the direction of motion.| 
 +|TGorillaPhysicsMotorType.VelocityMotor|A velocity motor drives towards angular and linear velocity. Use this type of motor f.e. for wheels of cars or paddlewheels of ships.|
  
-For a working joint between two bodies, each one has to have a rigid body collider set. 
-To do so, simply select your TGorillaPhysicsSystem component in the object inspector move to the "Colliders" property and add a collection item for the specific element. 
  
 =====Joint Types ===== =====Joint Types =====