Jump to content
  • Advertisement
Sign in to follow this  
Lars Junered

Collision and response problem

This topic is 3998 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! First sorry about my english! Grammatics is nothing I never understand (you see). Trying to implement the algoritm 'Improved Collision detection and Response Kasper Fauerby kasper@peroxide.dk http://www.peroxide.dk 25th July' dokument. DirectX SDK Jun 2006 Visual Studio Standard 2005 Visual CC Microsoft XP SP2 Home AMD 2600+ PC with a Radeon 9600 card (too slow I know ... send me money:-)). I have created a mesh class for static meshes. In this meshes I save vertex list and index list. When I'm in a house everything is almost ok. Ok I will be stuck in one specific corner?? Can't really understand why but I think it's something with the walls dimension or something like that (speed). Later problem. But my problem (the hard ununderstanding) is outside the house. When my figure or sphere is sliding on my terrain everything works perfect (T2). When going from terrain and collide with the houses walls the big problema rises. I have boundingbox check to speed everything up. But this check is not exactly matching the sphere so I found almost all the times the walls before I really collidate with it so I must let the y value be +0.1f when I'm near the wall else I get stucked (or the figure go down in the ground a little). Ok thats better then found it later because then I would be inside a house (who is not mentioned to go inside). But of some reason sometime and always the same side of the house the collision response works. On the other sides the sphere (figure) is halfway in to the wall or even more before the respone works????? But I cant slide after the hole wall it get stucked when I near one corner. Sometimes a good distance from it so it seems to be that triangle who have two wertex up and one in the ground?????? I can't figure out where the problem is. If I trying to disable gravity nothing works as it should and that is mysterious. It go through the walls and every step the y-value decrease (like it flying up). Could anyone who have implement this algoritm give me a hint. And how setting this parameter values? const float unitsPerMeter = 100.0f; const float veryClose = 0.0005f; float unitScale = unitsPerMeter / 100.0f; float veryCloseDistance = 0.005f * unitScale; (why 0.005f?) Maybe a ground plattform around the house would make it easier to avoid terrain/house decideproblem (so I could be sure that it's nothing with that to do) /Greetings and Cheers

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!