ode4j icon indicating copy to clipboard operation
ode4j copied to clipboard

Setting axis to Y-up

Open jfelrod1960 opened this issue 3 years ago • 2 comments

Is there a way to set ode4j to use a y-up orientation? @tzaeschke

jfelrod1960 avatar Feb 18 '21 16:02 jfelrod1960

Do you know whether this is possible in ODE C++?

Also, I think odej4/ODE does not really care, unless you look at rotation matrices?

tzaeschke avatar Feb 22 '21 20:02 tzaeschke

What exactly do you want to achieve?

I don't think ode/ode4j has a concept of 'up'.

For gravity, it is easy to set positive or negative gravity. If you want some kind of general rotation, I suppose you can specify a rotation matrix for your ground floor (or some other fixed body) and use dBodyVectorFromWorld / Body.vectorFromWorld to invert the y-axis. But I guess it is faster and easier just to invert the y-axis manually.

Maybe you can ask on the C++ forum? ode4j supports almost everything that ODE C++ supports (except things OPCODE).

tzaeschke avatar Feb 23 '21 18:02 tzaeschke