driving game

Show what you made with Bullet Physics SDK: Games, Demos, Integrations with a graphics engine, modeler or any other application
dakffyd
Posts: 13
Joined: Wed Jan 20, 2010 1:35 am

Re: driving game

Post by dakffyd »

tatsujin wrote:
dakffyd wrote:
kester wrote:Bullet sets the wheel contact normal in btVehicleRaycaster::castRay.

I derive from btVehicleRaycaster and override that method ...
How do you determine which vertices to use?
I assume the data must be somewhere in either the btRigidBody or the btVehicleRaycasterResult ?
Generally, since the vehicles are heavy & slow-moving, perhaps you'll get better result using rigid body wheels instead of ray cast.
In my own experiments, rigid body wheels have quite big advantages over raycast in terms of being realistic. But since things usually breaks apart physics-wise at high speed (rotations) and require more processing power, raycast usually is better suited for racing-type games... But your choice of vehicles implies that this is not racing :)
true. But processor power IS a concern. Hence, we're trying raycast vehicles first.

@kester: Thanks! That triangle index is what I was looking for.
hurricane
Posts: 3
Joined: Fri Nov 25, 2011 6:15 am

Re: driving game

Post by hurricane »

I am trying to implement "interpolate normals" in my racing game. As per Kester's document of interpolate normals, i am not able to figure out which normals,positions and indices are used in InterpolateMeshNormal method. Please give your valuable suggestions...



Regards
huRRc@ne
kester
Posts: 27
Joined: Mon Dec 01, 2008 5:08 am

Re: driving game

Post by kester »

Hi,

The normals, positions and indices I used came from the collision mesh for my road.

There's a lot of work not really mentioned in my article: you need to implement a btStridingMeshInterface class to provide the normals, implement ray-cast callbacks, and the vehicle ray-caster to override the wheel casts.

I haven't got my original code to refer to any more, and it's been quite a while since I've looked at it, but I've updated the code in my article to indicate the general idea. I haven't tested it though.

The article's here: http://bit.ly/tmC4nG

Cheers,

Kester
Post Reply