Crystal Space
Welcome, Guest. Please login or register.
September 02, 2014, 04:46:48 pm

Login with username, password and session length
Search:     Advanced search
9009 Posts in 2043 Topics by 8378 Members
Latest Member: Gwenlode
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Development
| |-+  Support
| | |-+  Wheels and physics
« previous next »
Pages: [1] Print
Author Topic: Wheels and physics  (Read 1711 times)
TurboGlider
Newbie
*
Posts: 4


View Profile
« on: August 09, 2005, 08:06:29 pm »

Hi,

I play around with the physics in CS, I get my spring works (not exact but almost). Now I want my wheels to rotate, how do I do that?


// wheeljoints for wheel 1
  csRef<iJoint> joint5 = dynSys->CreateJoint ();
  joint5->Attach (rb2, rb2s);
  joint5->SetMinimumDistance (csVector3 (0, 0, 0));
  joint5->SetMaximumDistance (csVector3 (0, 0, 0));
  joint5->SetTransConstraints (true, true, true);
  joint5->SetMinimumAngle (csVector3 (0, 0, 0));
  joint5->SetMaximumAngle (csVector3 (0, 0, 0));
  joint5->SetRotConstraints (true, true, true);


If I set "SetRotConstraints" my wheel will go off and get weird connections to the springs. What am I doing wrong here?

/TurboGlider
Logged
sasKuach
Guest


Email
« Reply #1 on: August 13, 2005, 04:03:16 pm »

Just a guess, as I'm still new to this, but shouldn't at least one constraint be open? Like this:

joint5->SetRotConstraints (true, true, false); //whatever way you need it to turn
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 3.214 seconds with 15 queries.