# How to rotate camera or object with mouse wheel

**URL:** <https://discourse.threejs.org/t/how-to-rotate-camera-or-object-with-mouse-wheel/39787>\
**Category:** Questions\
**Tags:** transform\
**Created:** [June 29, 2022, 10:36am UTC](https://discourse.threejs.org/t/how-to-rotate-camera-or-object-with-mouse-wheel/39787 "2022-06-29T10:36:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abhiwan\_Trainee](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/abhiwan_trainee/32/25594_2.png) [@Abhiwan\_Trainee](https://discourse.threejs.org/u/Abhiwan_Trainee)\
**Post date:** [June 29, 2022, 10:36am UTC](https://discourse.threejs.org/t/how-to-rotate-camera-or-object-with-mouse-wheel/39787/1 "2022-06-29T10:36:17Z")

</div>

how to rotate camera or object with mouse wheel

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [June 29, 2022, 10:40am UTC](https://discourse.threejs.org/t/how-to-rotate-camera-or-object-with-mouse-wheel/39787/2 "2022-06-29T10:40:53Z")

</div>

Duplicate of:

> [@\[solved\] Mouse wheel rotate geometry](https://discourse.threejs.org/t/solved-mouse-wheel-rotate-geometry/4230):
>
> Hello I’m completely new to three.js. For a website, I need to rotate 3d octahedron on scroll. So I choose three.js. I found this example [https://jsfiddle.net/f2Lommf5/2037/](https://jsfiddle.net/f2Lommf5/2037/) with scroll and three.js, but the scroll move only the camera, and I want the mousewheel change rotation and position of the octahedron. So I change geometry [https://jsfiddle.net/vander2000/x9c1u6vj/2/](https://jsfiddle.net/vander2000/x9c1u6vj/2/) and When I try to have action on my octahedron, console tell me my var (cubeA) is not defined. What I do wrong ? Tha…
