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 / get object height-similar!

Author
Message
Uncle Sam
19
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 1st Sep 2005 01:07
Great news for the WHOLE DB community!

I have almost completey finished making a command:

return value=OBJECT TOP Y(obj,x,y)

That's right, you'll be able to position objects on top of ramps and such so that they walk up!

I am having some trouble, though:

You know how when you move an object really fast, it can sometimes go through other object(s), even if the other object(s) are detecting the fast-moving object's collision?

Well how can I prevent this? Is there a way to move fast AND not pass through an object that's detecting for the fast-moving object's collision?

Please help; it will benefit the entire community.

-Uncle Sam

--------------
Uncle Sam
Call me coder
20
Years of Service
User Offline
Joined: 5th Mar 2005
Location:
Posted: 1st Sep 2005 01:24 Edited at: 1st Sep 2005 01:25
I am having the same problem. In my game. Whenever you charge at the edge of a matrix very fast. You get flung into the air across the level.


TO ALL THOSE PROGRAMING PEOPLE OUT THERE!
Uncle Sam
19
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 1st Sep 2005 02:24
There has to be a way!

--------------
Uncle Sam
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 1st Sep 2005 03:53 Edited at: 1st Sep 2005 03:54
It's all down to timing with the Sync.

As you know, with Sync On, DB does all the 3D drawing in one go and when it hits the Sync it updates the screen.

My guess is that when you place your object that collides with the other object, you need to immediately check for collision and if it hits, reposition it to just in front of the object being collided into before you do the Sync.

That way, the user won't actually see the first object penetrate the second object because it will have been moved before the screen refreshes.

And stop giggling at the back - just because I used the word penetrate!

TDK_Man

Uncle Sam
19
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 1st Sep 2005 04:24
Thank you.

1 more question: if you have a rectanglure object, and you rotate it, is there a way to make its collision box rotate with it?

--------------
Uncle Sam

Login to post a reply

Server time is: 2025-05-22 09:20:17
Your offset time is: 2025-05-22 09:20:17