Skip to main content
gamedev.net
🔒 Locked

When Scaled...

Started by MotionCoil Sep 18, 2005 at 3:44 PM 2 replies 950+ views
Original Post
MotionCoil
MotionCoil
Hiya GDnetters! long time no haunting [smile] anyway, cut to the chase- I've gotten back to my engine (well, getting back into it) again. My next task is to do some basic collision detection. The thing that I'm confused about is the following: -The whole map is scaled down to 100th of the size (my own map format). -The models are scaled down even further When it comes to collision detection do I need to take the scaling into account? Or do I need to run through all the collision detection BEFORE I scale everything down. I hope you kinda see what I'm getting at here. TIA -Charlie
Enselic
Enselic
If you scale the objects used in the collision calculations with the same factor as the scaling of the vertices of the models it will not matter whether you do collision detection before or after scaling. One could argue that before scaling collision detection is slightly more accurate since we are dealing with greater values, but for a game, that diffrence in precision is neglectable.
deavik
deavik
Most definitely collision detection after scaling. Enselic, you might not have thought about the fact that, what the heck I'll try to explain with another crappy ascii drawing:

     |     |                   |   |     |     |                   |---|     |-----|------------------        ------------------

The code used for positioning remains same, but the size of the object changes - and then it will most definitely matter when you are doing the testing.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.