WHAT'S THIS?
This is a demo about vehicles without raycasting.
IMPLEMENTATION NOTES:
I used a btHinge2Constraint for the wheels, but I disabled the (vertical) suspension spring, because I couldn't find a good setting for it, and I replaced it with a vertical translational motor.
Thus now the suspension model is extremely simple, and raycast vehicles outperform this kind of vehicles easily.
Despite of this, I released this demo because:
1) There was no demo about it.
2) It can still be very useful for modelling very simple vehicles (e.g. toy vehicles).
3) Some particular kind of vehicles (such as trains) can probably be done better with this approach.
4) I've added a bunch of wheel collision shapes that can be used for other purposes too (e.g. in raycast vehicles with convex cast or just as collision shapes for wheel collision detection).
KEYS:
CAMERA:
-------
HOME - change camera view
PAGE_UP / PAGE_DOWN - change camera distance
VEHICLES:
---------
END - change vehicle
ARROW KEYS - drive vehicle
GLOBAL INPUT SPEED:
--------------------
F1 / F2 - decrease / increase input speed to adjust it for your PC power.
All keys must be pressed while the openGL window has focus.
PROBLEM:
The debug drawer doesn't seem to display (at least) one of my wheel collision shapes in a decent way.
No matter, I'm going to post a raytrace pic to show it better soon...
Hope you like it and find it useful.
Hinge2Vehicle Demo (with source code)
-
- Posts: 456
- Joined: Tue Dec 25, 2007 1:06 pm
Hinge2Vehicle Demo (with source code)
You do not have the required permissions to view the files attached to this post.
-
- Posts: 456
- Joined: Tue Dec 25, 2007 1:06 pm
Re: Hinge2Vehicle Demo (with source code)
Here is a pic of the demo in action:
And this is a raytrace screenshot of the most complex wheel collision shape included in the demo (I named it btWheelShape AFAIR), added to show it better:You do not have the required permissions to view the files attached to this post.