Collision Detection for Platforms
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.
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement