Game Development Community

UpdateWorkingCollisionSet in Player vs Vehicle

by William Todd Scott · in Torque Game Engine Advanced · 02/05/2007 (12:20 pm) · 6 replies

Hi all,

Not content with only trying to understand Torque's networking, I am also digging into the physics. The first question I have on this topic relates to the differences in updating the working collision set as it is done in the player class and the base vehicle class.

Specifically, the player class attempts to use the cached version of the working list from the last query while the vehicle class does not.

Why wouldn't these classes handle this in the same manner? Does attempting to use the cached version, as is done in the player class, result in some accuracy errors that is unacceptable for vehicles? If so, I would have thought that the player class would require more accuracy, given that it is the player's avatar.

Can someone shed some light on why the differences exist or an opinion on which method they believe (or know) is better?

Thanks
Todd

#1
02/05/2007 (12:30 pm)
Another followup to this...

It seems like using the cached working list, as is done in the player class, takes into account the fact that the player may not have moved, but it does NOT seem to take into account the fact that everything else in the world could have moved and thus the working list should be different.

Is that correct?


edited for clarity
#2
02/05/2007 (1:48 pm)
Quote:
It seems like using the cached working list, as is done in the player class, takes into account the fact that the player may not have moved, but it does NOT seem to take into account the fact that everything else in the world could have moved and thus the working list should be different.

You are right in that the player who stands still won't be computing any physics. However, this is not a problem because other moving players are, and so the collision simulation is the same.
#3
02/05/2007 (1:49 pm)
Hey William,

Check out this great resource by Matt Fairfax. It addresses some of the questions you have.

Collision Tutorial Object
#4
02/05/2007 (2:00 pm)
@Stefan: Thank you. (I'm embarassed that I missed that!)

@Drew: Also, thank you. I am giving that a complete read now.

As always, I appreciate the help guys.

Todd
#5
02/05/2007 (3:14 pm)
Nothing to be embarassed of. This is pretty cool stuff! Especially the extrudedPolyList class, it has alot of optimizations that might not seem logical at first.
#6
02/05/2007 (7:28 pm)
Ok,

The information Drew pointed me at is fantastic and does address the big differences in handling collisions in the player class and the vehicle class.

However, I don't believe it answers why the Player class attempts the early out in updateWorkingCollison() and the vehicle class doesn't. It seems like the vehicle class would both benefit from that optimization.

Thanks
Todd