# Add Scaling and Rotation Gestures for Spawned Objects

**URL:** <https://forum.8thwall.com/t/add-scaling-and-rotation-gestures-for-spawned-objects/8140>\
**Category:** Technical Support\
**Created:** [August 21, 2025, 9:47am UTC](https://forum.8thwall.com/t/add-scaling-and-rotation-gestures-for-spawned-objects/8140 "2025-08-21T09:47:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![durai\_raj](https://avatars.discourse-cdn.com/v4/letter/d/74df32/32.png) [@durai\_raj](https://forum.8thwall.com/u/durai_raj)\
**Post date:** [August 21, 2025, 9:47am UTC](https://forum.8thwall.com/t/add-scaling-and-rotation-gestures-for-spawned-objects/8140/1 "2025-08-21T09:47:30Z")

</div>

1. **Pinch (two-finger gesture) → scale the last placed object**

2. \*\*Drag (single-finger gesture) → rotate the last placed object

---

<div class="post-metadata">

**Author:** ![GeorgeButler](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.8thwall.com/georgebutler/32/1903_2.png) [@GeorgeButler](https://forum.8thwall.com/u/GeorgeButler)\
**Post date:** [August 21, 2025, 3:45pm UTC](https://forum.8thwall.com/t/add-scaling-and-rotation-gestures-for-spawned-objects/8140/2 "2025-08-21T15:45:34Z")

</div>

Hi, welcome to the forum!

Can you provide a bit more information, What’s not working with the script?

---

<div class="post-metadata">

**Author:** ![durai\_raj](https://avatars.discourse-cdn.com/v4/letter/d/74df32/32.png) [@durai\_raj](https://forum.8thwall.com/u/durai_raj)\
**Post date:** [August 22, 2025, 6:23am UTC](https://forum.8thwall.com/t/add-scaling-and-rotation-gestures-for-spawned-objects/8140/3 "2025-08-22T06:23:24Z")

</div>

1. **Pinch (two-finger gesture) → scale the last placed object**

2. \*\*Drag (single-finger gesture) → rotate the last placed object

---

<div class="post-metadata">

**Author:** ![GeorgeButler](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.8thwall.com/georgebutler/32/1903_2.png) [@GeorgeButler](https://forum.8thwall.com/u/GeorgeButler)\
**Post date:** [August 22, 2025, 5:51pm UTC](https://forum.8thwall.com/t/add-scaling-and-rotation-gestures-for-spawned-objects/8140/4 "2025-08-22T17:51:37Z")

</div>

I can’t see anything wrong with the script, could you share the project with support so I can take a look?

> **[Project Sharing | 8th Wall](https://www.8thwall.com/docs/account/projects/project-sharing/#share-project-with-support)**
>
> Project sharing allows members of another trusted workspace to access a specific project in your

---

<div class="post-metadata">

**Author:** ![durai\_raj](https://avatars.discourse-cdn.com/v4/letter/d/74df32/32.png) [@durai\_raj](https://forum.8thwall.com/u/durai_raj)\
**Post date:** [August 25, 2025, 6:50am UTC](https://forum.8thwall.com/t/add-scaling-and-rotation-gestures-for-spawned-objects/8140/5 "2025-08-25T06:50:54Z")

</div>

Thanku you for reply  
i share my project

**Goal**

After spawning an object in your scene, =want to:

1. **Rotate the object** by dragging

2. **Pinch to zoom** (scale up or down) using two fingers.

---

<div class="post-metadata">

**Author:** ![GeorgeButler](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.8thwall.com/georgebutler/32/1903_2.png) [@GeorgeButler](https://forum.8thwall.com/u/GeorgeButler)\
**Post date:** [August 25, 2025, 3:54pm UTC](https://forum.8thwall.com/t/add-scaling-and-rotation-gestures-for-spawned-objects/8140/6 "2025-08-25T15:54:11Z")

</div>

Looking at the script it looks like you’re listening for the events on the eid of the entity that has the script but I would probably listen to the event for each object you spawn with addEventListener right after it’s spawned. That way you’re getting the touched event etc per object instead of once for the most recent object. This would also let you do the gesture directly on the object.
