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 / Object Hit vs Object Collision

Author
Message
Mistrel
Retired Moderator
20
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 14th Mar 2010 18:37
Can anyone clarify the difference between these two commands?

From what I can tell "Object Hit" will return true if the two objects collided during the last rendered frame and "Object Collision" will return true for the current frame that has yet to be rendered.

Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 14th Mar 2010 20:34
Quote: "OBJECT HIT
This command will return a one if the two specified 3D objects hit each other. "


I think this means if they actually touch one another.

Quote: "OBJECT COLLISION
This command will return a one if the two specified 3D objects are overlapping. "


Speaks for itself

Hope that helped.

Windows 7 32-Bit Home Premium Intel Pentium Dual-Core @ 1.46Ghz 2038mb RAM
Kira Vakaan
17
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 14th Mar 2010 21:02
Yeah, from what I can tell, object hit() returns a one on the first (and only the first) frame that two objects are colliding, whereas object collision() returns a one whenever the objects are colliding.
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 16th Mar 2010 00:27
Object collision treats the object as solid also, so if object 1 is fully within object 2, it wont hit, but it will collide.

My signature is NOT a moderator plaything! Stop changing it!

Login to post a reply

Server time is: 2026-07-27 06:01:58
Your offset time is: 2026-07-27 06:01:58