#1
|
|||
|
|||
Problem with getEuler and setEuler
Hi
I am working on a little code, where I have a small kinematic that I want to move with some key´s. When a key is pressed, a function calculates all the necessary new angles of all my bodys. This function gives these values to a second function. This second function does the following with these values for each body. Code:
euler = body.getEuler(viz.ABS_GLOBAL) euler[1] = valuefromfunction body.setEuler(viz.ABS_GLOBAL) when I print out the values for valuefromfunction and the getEuler variable, the values are ok. But the vizualisation of the body alternates between two positions, one lets say 88° and the second 92°. But I think it is only a vizualisation problem, because the value in the next step for the getEuler function is correct (92°). Even if I use the following code, the vizualisation alternates. Code:
euler = body.getEuler(viz.ABS_GLOBAL) euler[1] = 92.0 body.setEuler(viz.ABS_GLOBAL) Perhaps someone can help me. Sandro |
|
|