0

I really can't understand why this is happening, but let me start from the beginning:

I have this finger texture on a plane, and on idle rotation the finger is pointing to the Y+.

enter image description here

I want it to point to X+ so here is what I did:

1- I first make the finger point to Z+ by adding -90 for the x-axis.

enter image description here

Exactly as I expected!

2- the issue is, I set y to 90 and expected it to rotate on Y axis, but instead it rotates on the Z-axis, this is what I got:

enter image description here

it is still pointing to Z+, changing the y rotation didn't work as expected!

What I am doing wrong here? how to make it point to Z+?

shamaseen
  • 2,193
  • 2
  • 21
  • 35
  • See https://stackoverflow.com/questions/17517937/three-js-camera-tilt-up-or-down-and-keep-horizon-level/17518092#17518092 – WestLangley Jun 10 '21 at 20:33

1 Answers1

0

Possible Errors

  • The Plane Object3D is the child of a PlaneHolder Object3D which is rotated, so when you rotate Plane, it is only rotating in the local space of its parent, so it will act weird. use Plane.rotateOnWorldAxis(new Vector3(0, 1, 0), THREE.Math.degToRad(90)); to rotate plane on world axis.
  • in the first image you provided, the y-axis blue is pointing to the opposite direction, however in the 2nd/3rd images it is in the proper direction.
  • in the first image you provided, the x-axis red the tip arrow is pointing to the opposite direction, and if you rotate 90deg on x-axis it should be pointing to Z+ but it is pointing to Z-, so even the 2nd image is wrong

Tip

The Three.js Axis-Helper has 3 colors (red: x-axis, green: y-axis, blue: z-axis), and the default options are => red pointing to the right, green pointing upwards, and blue pointing to the camera (if camera is added on V3(0,0,5) and looking at V3(0,0,0) which has the axis-helper)

Ibrahim W.
  • 615
  • 8
  • 20