Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sun Jul 01, 2012 5:19 am 
Offline

Joined: Sun Jul 01, 2012 5:15 am
Posts: 6
Greetings,

I'm trying to learn how to simulate a car using basic cylinders for wheels and a spring 6DOF constraint for the shocks. The issue I'm having is that in order to orient the wheels correctly, I have to rotate them about the Z axis 90 degrees (y is up in the world). Then, when I go to constrain rotation with setAngularLowerLimit and setAngularUpperLimit, it seems to get in a gimbal lock when I try to free the y axis and lock everything else. I tried rotating the local frame of the constraint and all it did was rotate the cylinder on its side. How can I avoid messing up the basis vectors when constraining with a rotated body?

Thanks!


Top
 Profile  
 
PostPosted: Sun Jul 01, 2012 5:43 am 
Offline

Joined: Sun Jul 01, 2012 5:15 am
Posts: 6
Okay, so I noticed that if I don't pre-rotate the rigid body before constraining it, it will rotate into place and work just fine. Is there a way to make it instantaneously fix itself? It looks kind of funny spawning the car and having the wheels flip 90 degrees into place.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group