View Single Post
  #3  
Old 10-15-2008, 01:11 AM
Sandro Holzer Sandro Holzer is offline
Member
 
Join Date: Jul 2008
Posts: 19
Hi farshizzo

Thank you for your reply.
You are right, but this was just a mistake in my post, in the real code I use it in the right way.

I found out that from the getEuler command I get the following values over time when the euler[1] is below 90°.

[89.999992370605469, 15.054423282822412, 180.0]
[89.999992370605469, 15.284483029244234, -180.0]
[89.999992370605469, 15.514467754963817, 180.0]
[89.999984741210937, 15.744379632324945, -180.0]
[89.999984741210937, 15.974220816530522, 180.0]

So euler[1] is counting up as I wish, but euler[2] changes between 180 and -180.

When I then come to euler[1] above 90° the following happens:

[89.999969482421875, 89.331317543614588, -179.99996948242187]
[90.000259399414063, 89.671680555074119, -179.99967956542969]
[90.000267028808594, 90.014174815361827, -179.99966430664062]
[-89.993125915527344, 90.358861660505966, 0.006933863740414381]
[90.006790161132813, 90.705805246476245, -179.99314880371094]
[-89.993240356445313, 91.055072733185696, 0.0068237865343689919]
[90.006736755371094, 91.406734484200612, -179.99319458007812]
[-89.993148803710938, 91.760864283827303, 0.0069220983423292637]
[90.006858825683594, 92.117539573461329, -179.99307250976562]
[-89.993156433105469, 92.117539573461329, 0.0069229668006300926]

euler[2] has already a roundoff error and has now -179.999 or something like this.

euler[2] and euler[0] now switch the "direction", if I then set the euler[1] to my angle (above 90°) then the rotation with the 3 euler angles gives different positions of the body.

I hope this helps to find the problem.

Sandro
Reply With Quote