WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-14-2008, 03:47 AM
Sandro Holzer Sandro Holzer is offline
Member
 
Join Date: Jul 2008
Posts: 19
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)
This works for most of the time, but sometimes when the "valuefromfunction" is beyond 90° the body angle is set wrong by the setEuler funktion.
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)
I hope I use the commands in the right way.

Perhaps someone can help me.

Sandro
Reply With Quote
 

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:19 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC