Translation, Rotation and Scale: How to Change an Object in the World | AR Unity Developer

Derek Anderson
2 min readApr 15, 2024

--

Thanks to the AR Selection Interactable, the AR app can select cubes that have been placed in the AR world. The next set of AR interactables to explore and use are Translation, Rotation, and Scale.

The AR Translation Interactable will move the placement prefabs through the use of dragging fingers. Add this component to the placement prefab, and just like the AR Selection Interactable, drag the cube box collider over to the Collider portion of the component. This component has an object translation mode, which can be configured to track horizontal, vertical, or both types of movement.

Next up is the AR Scale Interactable. Adding this component to the placement prefab will allow a user to change the scale or size of the object using a “pinch” gesture. This component has settings for a minimum and maximum value. There are also settings for sensitivity and elasticity. The sensitivity settings will determine the strength of movement being translated into the scale, while elasticity will determine how “bouncy” the object will react when reaching the maximum or minimum values. In addition, there is an elastic ratio limit for use while scaling the object. This can be helpful in letting users know that they hit the upper or lower limits of scaling the placement prefab.

Finally, the AR Rotation Interactable will rotate the object with a twisting motion. When this is added to the placement prefab, a user can turn the object by moving two fingers around a center point, a rotation should occur with the placement prefab. This can also be done with a dragging motion. Whatever option you choose, the rotation rates can be changed in the component settings.

Once those components are added, either individually or all at once, test them out and change any settings on the components regarding translation, scale, or rotation.

--

--