Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue Jan 17, 2012 7:02 pm 
Offline
User avatar

Joined: Thu May 06, 2010 11:35 am
Posts: 2
So i want my car to be able to ride 360* around a pipe. I need to disable gravity and apply custom force for each object, but btRaycastVehicle does not support adding forces, nor disabling gravity. There is however
Code:
setCoordinateSystem    (    int     rightIndex,
      int     upIndex,
      int     forwardIndex   
   )
, but it doesn't seem like a good idea to change it every frame, does it ?
On another approach I could make a car out of "lego": convex chasis + cylinder wheels + joints. VehicleDemo does say
Quote:
///btRaycastVehicle is the interface for the constraint that implements the raycast vehicle
///notice that for higher-quality slow-moving vehicles, another approach might be better
///implementing explicit hinged-wheel constraints with cylinder collision, rather then raycasts
though I want my car to move FAST. Will this method still provide good results for fast cars ?
Any links on implementing suspension and preventing sliding on turns, will be appreciated.


Top
 Profile  
 
PostPosted: Wed Jan 18, 2012 12:55 pm 
Offline

Joined: Fri Aug 01, 2008 6:36 am
Posts: 144
Location: Bonn, Germany
Quote:
but btRaycastVehicle does not support adding forces, nor disabling gravity.

vehicle's chassis is a rigid body and you can apply forces or disable gravity. Where and how apply force depends on kind of force... To use some custom gravity model you may try to apply gravity per object.
I have experimented a little with gravity some time ago (s. attach).

Quote:
Code:
setCoordinateSystem    (    int     rightIndex,
      int     upIndex,
      int     forwardIndex   
   )

, but it doesn't seem like a good idea to change it every frame, does it ?


it were not a problem, but, afaik, it wouldn't help, unfortunately you will have to modify vehicle code if you wish vehicle work in a world different from trivial flat world. Not sure it is good idea just now, but may be i shall test it too, because once i have had an idea to create a scene on a tiny asteroid. If i shall get something interesting i shall share...


Attachments:
test.zip [3.66 KiB]
Downloaded 80 times
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 5 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