3
$\begingroup$

We are trying to rotate an object in blender according to an external accelerometer. We have no issues in obtaining the data from the accelerometer. However, when we rotate the object along two axis the third rotates on its own. How can we rotate the object in blender according to the accelerometer's relative angle to the ground?

$\endgroup$
3
  • $\begingroup$ Can you post a screen-shot of your logic-bricks / script-texts ? $\endgroup$
    – Yvain
    Commented Apr 5, 2016 at 12:41
  • $\begingroup$ Related: blender.stackexchange.com/questions/1953/…‌​-the-game-engine/ $\endgroup$
    – Mentalist
    Commented Apr 5, 2016 at 16:15
  • $\begingroup$ Have you tried forcing the 3rd axis to be 0°/90°/180°? $\endgroup$
    – Rick Riggs
    Commented Apr 5, 2016 at 17:21

1 Answer 1

1
$\begingroup$

This depends on how you want to transform your linear value (accelerator value) to coordinates in the BGE.

A very easy way is to define an animation and play it with with the action actuator in property mode. Fill the actuator's property with the acceleration value.

This way you get a direct transformation from acceleration to animation frame to animation pose.

enter image description here

How you get the accelerator value into the property "frame" is up to you.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .