Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Constraint components

Add Constraint components to position, move, and manage GameObjects relative to each other.
Read time 1 minuteLast updated 13 days ago

Constraint components allow you to control the position, rotation, and scale of GameObjects based on other objects in your scene. They provide a way to create relationships between objects without using parent-child hierarchies or writing custom scripts.
Constraints are useful for character rigging, camera control, and creating relationships between objects. You can use multiple constraints on a single GameObject and blend between multiple source objects to achieve complex behaviors.

Topic

Description

Constraint components introductionUnderstand Constraint components and how they control GameObject transforms based on other objects.
Aim Constraint componentConstrain a GameObject to aim at one or more target objects.
Look At Constraint componentRotate a GameObject to look at a target object.
Parent Constraint componentControl a GameObject's transform as if it were a child of one or more parent objects.
Position Constraint componentConstrain a GameObject's position to follow one or more source objects.
Rotation Constraint componentConstrain a GameObject's rotation to match one or more source objects.
Scale Constraint componentConstrain a GameObject's scale to match one or more source objects.

Additional resources