Jump to content
  • Advertisement
Sign in to follow this  
slyprid

Collision Detection for Platforms

This topic is 4481 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

With my current game i'm working on I've been trying to implement a system for collision detection. Its coming along decently but i'm having some issues trying to get jumping up onto something to work properly. What I've implemented is a system of vectors protruding out of the character. I have a total of four vectors coming out of each object. vectors The way it works is each frame I check to see if a certain vector is within another object, if so a collision occurs. Well I thought this was pretty straight forward for landing on an object, I would just determine if my vecGravity vector is within an object and push it back up. Well it doesn't seem to be working. Is my basic theory wrong for this, or is there a better way to go about this. Reason I'm using vectors instead of Rect's is I figured that by doing this it would create a better more realistic physics within the program. Also I would be able to implement other nifty things like sliding down slopes and such. Thanks for your time. Slyprid

Share this post


Link to post
Share on other sites
Advertisement
I finally got it to work. I had the right idea, but found out some of my numbers were not coming out right after fixing those the world is full of gravity now. Now to apply it to other objects. :D

Slyprid

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!