๐ŸŽ›๏ธPhysics Gadgets

Physics Gadgets

Physics gadgets are all made using different methods or reading physics joint positions/angles to create events that simulate buttons, levers, and sliders.

These components are user-friendly interfaces that use Unity Events to allow for event and method calls without creating additional code (just like Unity's UI button)

Gadgets can be triggered by any collision with enough force to push the joint past the threshold

you can make a physics gadget interactable only when grabbed by setting the gadget's rigidbody to be isKinematic on start then disabling isKinematic through the grabbables OnGrab event

Here are some values to look for when setting up your rigidbody / joints to make them feel physically different when touching or grabbing:

Rigidbody Settings

  1. Mass: This represents how heavy your object is. A higher mass will make the lever feel heavier and require more force to move.

  2. Drag: This is like air resistance. Higher drag slows down the movement of the lever, making it feel as if it's moving through a thicker medium.

  3. Angular Drag: Specifically affects rotational movement. Increasing this value will slow down the lever's rotation, useful for simulating resistance or damping.

  4. Use Gravity: If this is checked, gravity affects the lever. Unchecking it can be useful if you want the lever to float freely without falling downwards.

  5. Is Kinematic: When enabled, the lever won't be affected by physics forces and must be moved by scripts. Good for freezing or disabling the gadget without turning disabling grabbing

Joint Settings

  1. Spring: This can be used to make the lever return to a default position or resist movement. Adjusting the spring's strength and damper will affect how the lever behaves when let go.

  2. Damper: This is part of the Spring settings. A higher damper value slows down the leverโ€™s return to the spring's target position, simulating a sort of cushioning effect.

  3. Break Force/Torque: These values determine how much force or torque can be applied to the lever before it breaks or disconnects. Setting these to high values (or infinity) means the lever wonโ€™t break under normal conditions.

Last updated