I think nes is right once again. Don''t check for collision three times, it will slow you way down. Check for it once and move accordingly.
nes: Your close. My heart is in San Diego, but I live in Los Angeles, which isn''t bad.
-BacksideSnap-
Collision : Smooth surface sliding (Quake series)
quote:Original post by -BacksideSnap-
I think nes is right once again. Don''t check for collision three times, it will slow you way down. Check for it once and move accordingly.
nes: Your close. My heart is in San Diego, but I live in Los Angeles, which isn''t bad.
-BacksideSnap-
Yo damn straight
------------------------
Captured Reality.
what am i supposed to do after i multiply the triangle normal by the min distance? i don''t see how this would do anything.
Hmmm, perhaps I wasn''t too clear on this..
Ok! I draw the world as I would a 2d tiling game.
Now, each block has a centerx value and a centerz value, plus they have a type value and a visible value.
Now, every time I check the input I check this :
for( int loop = 0; loop<1023; loop++)
{
if( block[loop].visible)
if( block[loop].type == 2) // 2 = wall
// check for collision
}
The code I had in the //check for collision // always worked but you got caught on the blocks.
Now I''m asking, how do I check if I collided w/ the x axis or the z axis so that I can stop it from moving and still move the other? (Btw, the blocks are 24x24... so the centerx or z will be 12, 24, 36, and so on. So add 12 or minus 12 to get it to collide right.)
Justin Eslinger
Ok! I draw the world as I would a 2d tiling game.
Now, each block has a centerx value and a centerz value, plus they have a type value and a visible value.
Now, every time I check the input I check this :
for( int loop = 0; loop<1023; loop++)
{
if( block[loop].visible)
if( block[loop].type == 2) // 2 = wall
// check for collision
}
The code I had in the //check for collision // always worked but you got caught on the blocks.
Now I''m asking, how do I check if I collided w/ the x axis or the z axis so that I can stop it from moving and still move the other? (Btw, the blocks are 24x24... so the centerx or z will be 12, 24, 36, and so on. So add 12 or minus 12 to get it to collide right.)
Justin Eslinger
Oh well, %#&^!
3D collision detection is completely different from 2D collision detection although you CAN use the same style in 2D as in 3D. I''m sorry, but I don''t know how to do it in 2d.
------------------------
Captured Reality.
3D collision detection is completely different from 2D collision detection although you CAN use the same style in 2D as in 3D. I''m sorry, but I don''t know how to do it in 2d.
------------------------
Captured Reality.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement