Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Collision Problems

Author
Message
CocaCola
16
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 16th Aug 2011 00:41
Hey guys, I have PhysX for this, but I decided it would be better learning if I attempted to write my own gravity and collision system,
I have a problem, I remember a while back I did something like im doing right now for collision and in my mind this should have worked, and just as I was typing this I had an idea that works with just now one problem, when my player (Obj 1) touches the colliding object (Obj 2) and holds going through it it's very jumpy.. can anyone tell me why this is?



Always program as if the person maintaining your program is a psychopath that knows where you live
Quisco DaLuse
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: USA
Posted: 16th Aug 2011 01:37
You have to save the values first (they are floats, btw), move the object and then test for the collision. If it collides, you simply move it back to the original position.

Login to post a reply

Server time is: 2026-07-10 17:19:05
Your offset time is: 2026-07-10 17:19:05