The easiest way to reduce the cost of vehicles would be to remove the wheels. Just use ray traces to find the wheel contacts and write your own simulation for the suspension dynamics (I'm assuming you're doing that anyway if you've got some kind of SOLID_BBOX car going). The airboat does this in HL2 (so it's totally possible and effective), but not all of the code is visible to mods because it shares some of the underlying havok suspension dynamics used on the jeep (and havok doesn't want their source code in our SDK). If you want to attempt this you'd just create a convex hull for the vehicle entity, set it to MOVETYPE_VPHYSICS (basically call VPhysicsInitNormal()), then attach it to a motion controller and apply impulses to simulate the dynamics in the motion controller Simulate() function. You could do your wheel raytraces there or in a think function depending on how frequently you want to update the contacts. Lots of games use this general technique.
Also - dynamic moving/rotating SOLID_OBB entities aren't coming in ep2 and wouldn't likely be faster than using vphysics for a single convex hull if implemented. SOLID_BBOX is faster because the swept collision problem is much simpler solve. We use vphysics for anything with dynamic rotation that needs to have varying collisions under rotation. It is true that the physics objects will be moving according to the rules of physics so you can only exert control over once per timestep. That is going to make really high frequency control impossible without decreasing the timestep of the simulator (which will cost more CPU as a result). This wasn't a big deal for the buggy or the airboat in HL2 though, so unless your vehicles are really different it's probably not a big deal for you either. Jay > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Joel R. > Sent: Friday, December 22, 2006 11:08 AM > To: [email protected] > Subject: Re: [hlcoders] SOLID_OBB or similar? > > -- > [ Picked text/plain from multipart/alternative ] Vehicles use > 5 physics objects, 1 for each tire and then the body. > Physics objects are always obeying the laws of physics, so > your control over them is not as precise as could be. > > On 12/22/06, Jed <[EMAIL PROTECTED]> wrote: > > > > I've a similar problem with player models actually when it comes to > > bounds for prone. They are always square and always > orientated "north" > > so using a rectangular bounding box doesnt work as it > doesn't rotate > > with the player. > > > > Just out of curiousity, is there anything that the HL2 Jeep > uses that > > might be of use? That seems to drive over terrain pretty well so I > > wonder if theres something in it's collision detection you > could use. > > > > - Jed > > > > > > > -- > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list > archives, please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

