Rive 101 logoRive 101
β„Ή AboutπŸ“‹ ChangelogδΈ­
0%
Progress0/90
5.11

Distance Constraint

3m 18s
Rive 101 - 6.11 Distance Constraint

β–Ά Watch on YouTube β†—

πŸ“Œ Key Points

Three modes: closer (max distance), further (min distance), exact (fixed distance).

πŸ“ TutorialAvailable

Summary

The Distance Constraint establishes a specific physical distance relationship between two objects. It can be used to set a maximum, minimum, or exact distance, allowing objects to be dragged or pushed based on these spatial boundaries.

Step by Step

  1. 00:26
    Adding the Constraint
    Select the object you want to constrain (the owner), navigate to the Constraints section in the Inspector, and add a Distance Constraint.
  2. 00:33
    Visual Distance Indicator
    Observe the red guide circle that appears; this is a visual aid representing the current distance value.
  3. 00:45
    Adjusting Distance
    Modify the Distance property in the Inspector to increase or decrease the radius of the constraint zone.
  4. 00:59
    Setting the Target
    Use the target selector to choose a second object. The distance indicator will snap to this target's location.
  5. 01:50
    Configuring Modes
    Choose between three modes to define the behavior:
    • Closer: The owner can move within the distance but is blocked from moving further away (maximum limit).
    • Further: The owner can move away but is blocked from moving closer than the set distance (minimum limit).
    • Exact: The owner is locked to a precise radius around the target, unable to move closer or further.
  6. 03:04
    Practical Application
    Use these modes to create mechanics like pupils staying inside an eye or objects being tethered to each other.

Notes About Current Rive

  • Interactive Physics: The Distance Constraint is ideal for simulating physical boundaries without complex coding, such as keeping a UI handle within its track.
  • Guide Visibility: The red circular guide is only an editor aid and will not appear in your final exported Rive file.
  • Target Dynamics: When the target moves, the constrained object will be "dragged" or "pushed" to maintain the rules of the selected mode.

πŸ“ Notes

Markdown supported
0 chars