Chovin / Litghtsaber

little PICO-8 game made for a couple events
MIT License
1 stars 2 forks source link

transform quaternion values to lightsaber rotation #2

Closed Chovin closed 4 years ago

Chovin commented 5 years ago

I'd like to transform the quternion given by the phone since that seems a lot more accurate than using the gyro.

  1. into a ray that points out of the top of the phone
  2. flatten it to the x and y plane to calculate the angle

I think I need to first have the player calibrate it by having them point it toward the screen before pressing a button. This will determine which way the player is facing. hopefully it's just the quaternion multiplied by the conjugate of the quaternion gotten during calibration.

Chovin commented 5 years ago

gravity is much easier to deal with. we'll use this for now 90b1424 and put this issue on the backburner

Chovin commented 4 years ago

we don't get quaternions anyway on mobile browsers right now