Convert gyroscope angle to freecamera

hi
how i can convert gyroscope angles to freecamera

1 Like

This converts Euler angle to freecamera Babylon.js Playground it might be a start?

1 Like

Hi guys. Nasimi, are you using deviceOrientation, or Quadcopter drone with Arduino? :slight_smile:

IF… you’re talking about deviceOrientation, I found this thing: Using device orientation with 3D transforms - Developer guides | MDN

I tried to get JohnK (in PM)… to verify that I was on-topic… for what you are asking, Naz. He refused to verify (wisely). heh

So, if above link is off-topic, it’s John’s fault. :wink:

1 Like

I think they are the same values (I’m not positive though)

You just define the relationship, like whats the gyros x to the cameras x and the y to y etc.

If its y up left handed gyro then you are in luck I would assume.

I’ve never worked with any gyros but after a quick google search it seems to be the same system, I think it might be specific to your gyro.

hey wing :slight_smile: yes quad + ar also i have height parameter too
i have 3 alpha +beta +gamma i think i most calculate up vector
if anyone do it i like use it if don’t i need recalculate
as i know that is
cam.rotation.y = alpha3.14159265 /180;
cam.rotation.x = 3.14159265
0.5- beta*3.14159265 /180;

but what is z rotaion or upvector ???

1 Like

haha. I was wrong. This IS a copter and arduino issue. But I guess gyros are gyros, no matter the mobile device.

Ok, I found a different link for this:
https://www.pieter-jan.com/node/7

Are you building an AR/touchscreen controller for copter, with BJS virtual copter doing same exact stuff as real copter-drone? That would be sweet, I suspect.

1 Like
1 Like

i try use drol liker player