SKAR (wost#1)
Posted in Programming on April 24th, 2009 by RimioSKAR is the game I’m working on at the moment. It started as an entry for the HyperTunnel competition on GameDev.ro.
After a few hours of futile attempts to model a Turbo Esprit, I gave up and started searching the net for free. low poly car models. The best thing I could come up with is … a beat up Trabant :|. Well, beggers can’t be choosers, right?
I managed to code around some of the problems in the PhysX WheelShape model, namely getting the wheel position and orientation. As far as I know, the API provides no way to get one transformation matrix for the wheel; instead, you have to get the global pose of the wheel shape (which actually casts a ray on the local Y- axis), call the shape’s getContact() method, providing an empty contact descriptor as parameter and then calculating the actual position by adding the contact distance (from the descriptor) and subtracting the wheel radius (keep in mind to do this after multiplying the modelview matrix with the shape’s global pose). Also, I had to do the tire roll and steer angle by hand from the wheel’s angular speed (getAxelSpeed) and steer angle (getSteerAngle). Read more »