Car riding around a cylinder

User avatar
nargil
Posts: 2
Joined: Thu May 06, 2010 11:35 am

Car riding around a cylinder

Post by nargil »

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: Select all

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
///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.
mi076
Posts: 144
Joined: Fri Aug 01, 2008 6:36 am
Location: Bonn, Germany

Re: Car riding around a cylinder

Post by mi076 »

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).

Code: Select all

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...
You do not have the required permissions to view the files attached to this post.