Sitemap

Adding AR Selection, AR Translation and AR Scale Interactable.

2 min readApr 13, 2025

Objective: Adding AR Selection, AR Translation and AR Scale Interactable.

Adding AR Selection

In the first step select the cube(Placement Prefab) in the project open it as prefab mode, add AR Selection Interactable. Now Drag and drop the collider of the child to Inspector into collider field to AR Selection Interactable.

User tap and hold to select this object by touching the screen.

Note: We need colliders because AR RayCast Manager will shoot a ray so collider will be able to be detected

Next we need to let user know if he is been select this object, to do this I will create cylinder inside a cube ,adjust its scale and put below the cube. Then I will disable this cylinder and drag and drop it to the Inspector to the selection visualization then disable this object.

Adding AR Translation Interactable

Select the Cube parent and add AR Translation Interactable, drag and drop cub collider <Inspector <Colliders.

There are couple option Object Gesture Translation Mode this specify if we want to move the object horizontal or vertical but I will leave horizontal as default and Max Translation Distance is how far the object can be move by default is 10 meter am not sure if 10 centimeter or meter.

User Drag his finger across the screen.

Adding AR Scale Interactable.

Add AR Scale Interactable into the parent of the prefab, I will set the min scale to 1 so we cant resize more than default size and set the max scale to twice the parent object so we can set the size twice the default the object size.

Bonus Making Scale Bouncy.

Set the Elastic Ration to 0.5 and Elasticity to 0.9,then try and see how it react when we scale the object.

See you into the next one.

--

--

Suleiman Abdullah
Suleiman Abdullah

Written by Suleiman Abdullah

Self taught Unity Developer, who is passion about making games ,and he loves Math For Game Development

No responses yet