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 Discussion / Static Object Collision

Author
Message
TheSquid
21
Years of Service
User Offline
Joined: 29th Sep 2003
Location: Ohio
Posted: 17th Oct 2003 16:19
I don't have the actual code snippet right now, but I can give you the description of what's going on. I am creating static collision boxes bordering a 10,000 by 10,000 matrix. The 200 by 200 static collision boxes are created (for example) with the following code:



I believe the problem is in my check for static collision:



The oldx,oldy,oldz values are being formatted correctly as are the newx,newy,newz values. On two of the four borders, this logic works fine. On the other two borders, I can not come within 100 world units of the boxes. The static collion boxes that end in zvlaue 400, my character stops at zvalue 500 (for example).

I realize this may be difficult without the actual code from my program. Can anyone be of some help?
hexGEAR
22
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Naytonia
Posted: 17th Oct 2003 17:23
haven't tried the code yet since i'm a school but try adding values to your oldy and newy variables in the second code, so the second code should be something like:



you don't have to use 100 though, you can make it smaller but having oldy = newy may be your problem. Hope that works/helps.

Login to post a reply

Server time is: 2025-05-21 14:16:52
Your offset time is: 2025-05-21 14:16:52