How to stop the controls from moving the cube? (..gift/page2)

Hello: (gift/page2)

I have this example: https://www.songnes.com/gift/page2.html
and here is the full code: https://www.songnes.com/gift/page2.txt

It works great! I just want to take the controls out.
so users can not move the cube with the mouse, or fingers in the iPad.
I want to have the cube fixed! Rotating YES! but in one single place!

I comment these lines

    //let controls;
    //controls = new THREE.OrbitControls( camera, renderer.domElement );

and the code didn't really work, I don't understand why. 
also, as you can see I'm still having trouble formatting the code!

Thanks for your help.

How do you get out of the code ( this won't work </> )

Orbit Controls move camera, not object. Try use https://threejs.org/docs/index.html#examples/en/controls/OrbitControls.enabled = false

1 Like

Thank you very much Dragon3DGraff…
this was perfect!

// SET CONTROLS
controls = new THREE.OrbitControls( camera, renderer.domElement );
controls.enabled = false;

So you show me how to use many of the questions I have.

I was wondering how to use the .something
I saw in the example… now I can try this .stuff and just add it to my variables
it looks like they will help a lot thanks for the .help you gave me.

1 Like