Hey! I am making a bowling game in which i need to check whether the pins are fallen down or not? I was checking before by getting Eular angles. The problem is Euler angles doesn’t give the same rotation value as in editor.
So i have changed the approach now. Now my question is how can i find angle between both the local and World UP vectors. Both Pictures are attached.
This image has a local vector perspective. While the image below has the World vector perspective changed through inspector.
Just to remind in both the pictures rotation value is not changed just perspective is changed from local to world.
Hey @yaustar! can you tell me the syntax to find local UP and World UP as i am confused in its syntax?
Till Now, i was normalizing the rotation vector and then taking dot product but it doesn’t seems to work perfectly. I am using the following syntax now.
this.temp = new pc.Vec3(20,0,0).normalize();
let temp3 = this.temp.dot(this.allPins[0].pinPosition.normalize());