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.

Newcomers DBPro Corner / object collision woes

Author
Message
Chief Voyager
21
Years of Service
User Offline
Joined: 20th Mar 2003
Location: United States
Posted: 9th Apr 2003 06:01
can't get this to work. my cube still goes through the house object. i'm new and i don't quite understand the oldx and oldz and all that stuff, i've read the tutorials and tried it with this particular code but it doesn't work.



what am i doing wrong?
You're ate up like a soup sandwich.
Engulfed by Darkness
21
Years of Service
User Offline
Joined: 31st Mar 2003
Location: Canada
Posted: 9th Apr 2003 06:44
Try putting the object collision line before geting the new object position.

Engulfed by Darkness
21
Years of Service
User Offline
Joined: 31st Mar 2003
Location: Canada
Posted: 9th Apr 2003 06:50
That will make your program move the object, then detect for object collision.
If collision is detected than the object will be positioned back at its last position before the object collision.


Hope you can make sense of that.
Chief Voyager
21
Years of Service
User Offline
Joined: 20th Mar 2003
Location: United States
Posted: 9th Apr 2003 07:57 Edited at: 9th Apr 2003 08:01
well, that worked when i walked into my tree, which didn't have collision turned on for it. so when i tried to walk into the house, i went right through it, and i had collision turned on for it. so i commented it out, and i still walked through it. why does it do that?



thanx e.b.d., you've been a big help, i got your other ideas to work for me, and i appreciate your time.

also, i have some plain objects that i made in db, and the collision works with those, too. i don't understand this. thanx again.

You're ate up like a soup sandwich.
Engulfed by Darkness
21
Years of Service
User Offline
Joined: 31st Mar 2003
Location: Canada
Posted: 9th Apr 2003 08:40
Your object collision box is wrong.

Put it to this:
Make object collision box 100,-650,-650,-650,650,650,650

That should do it.

In the Make object collision box object number,x1,y1,z1,x2,y2,z2
x1 gives the distance to the left side of your collision box from the center of your 3d object. Remember think 3d.
x2 the distance to the right side.
y1 distance to the bottom side.
y2 distance to the top side.
z1 distance to the side facing you.
z2 distance to the farthest side.
Chief Voyager
21
Years of Service
User Offline
Joined: 20th Mar 2003
Location: United States
Posted: 9th Apr 2003 20:32
thanx, e.b.d, i'll give it a shot.

You're ate up like a soup sandwich.
Chief Voyager
21
Years of Service
User Offline
Joined: 20th Mar 2003
Location: United States
Posted: 9th Apr 2003 21:57
thanx, e.b.d. i had to change the values A LOT but i think that that's because my house is kind of odd shaped. thanx again!

You're ate up like a soup sandwich.
Engulfed by Darkness
21
Years of Service
User Offline
Joined: 31st Mar 2003
Location: Canada
Posted: 10th Apr 2003 00:37
No prob!
Someday i might be lookin to you for advice.

If it's yellow let it mellow. If it's brown flush it down.

Login to post a reply

Server time is: 2024-11-24 09:43:45
Your offset time is: 2024-11-24 09:43:45