how to create a non-RaycastVehicle vehicle
-
- Posts: 7
- Joined: Mon Dec 01, 2008 3:37 am
how to create a non-RaycastVehicle vehicle
I am creating an arcade style 4x4 offroad racer. From what I understand on this forum, btRaycastVehicle is not recommended for 4x4 offroad vehicles and that I should create one from constraints. How would I go about doing this? Is there an example that I can learn from? I am using a btConcaveShape terrain to feed relevant polygons to the vehicle.
-
- Posts: 25
- Joined: Fri Sep 19, 2008 10:23 am
Re: how to create a non-RaycastVehicle vehicle
I've never actually had any issues in using ray-cast style vehicles in off-road situations. If anything, it's urban environments where I've seen the biggest problems with ray-cast vehicles.
Just give ray-cast vehicle a go, and see how it behaves for you.
Just give ray-cast vehicle a go, and see how it behaves for you.
-
- Posts: 7
- Joined: Mon Dec 01, 2008 3:37 am
Re: how to create a non-RaycastVehicle vehicle
I was under the impression that btRaycastVehicle doesn't work when Bullet is fed only relevant AABB-contained polygons on the fly (via btConcaveMesh::ProcessTriangles) as my engine uses? I am using a custom dynamic terrain with unique functions on a mobile device, so the other Bullet (bvh, terrain) mesh classes that i believe work with btRayCastVehicle are not an option. Am I wrong?
-
- Posts: 169
- Joined: Sun Jan 14, 2007 7:56 pm
- Location: Norway
Re: how to create a non-RaycastVehicle vehicle
I have used a similar custom terrain class feeding bullet with triangles within an aabb, and that worked just fine. Be aware that raycasting in general will be slow for longer rays as they will have a large aabb with lots of triangles. The raycast vehicle has very short rays, though, so that should be OK.
Best regards,
Ola
Best regards,
Ola