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 error

Author
Message
Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 27th May 2007 14:23
well I have object 1, a sphere and object 2, a box. Now when I use the command, it returns 1 when they collide ... everything fine here except for when I rotate the box at 45" on the Y axis ... now the sphere overlaps the box's corner and the command returns 0 . It only returns 1 near 1/3 of the box's center why is this happening ?

Could you help me treat my injured Dino-Fly ?
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 27th May 2007 19:47
It sounds like the collision box isn't rotating with the object.

When you use the Make Object Collision Box command, the last parameter is a flag. You need to set this flag to 1 or the collision box doesn't rotate with the object it's attached to.

Although unrelated to your problem, you also get a similar hassles if you scale an object bigger - the collision box doesn't scale at the same time.

TDK_Man

Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 27th May 2007 21:44
TDK, the help file said to set it ONLY to 0 and not one are u sure ? I mean I thought of setting it to 1 too out of obvious reasons but I then realised that well the help is ... always right ... sort of so any answer ? I'd really appreciate it

Could you help me treat my injured Dino-Fly ?
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 28th May 2007 03:54
Ah... hang on a minute, what I said I know is true in DBC. It might possible be the opposite in DBP as they flipped the usage of a lot of flags. Hang on...

OK, I just checked. Here's what the DBP help files say:

If a value of zero is specified for the flag value, the box will be deemed to be a non-rotating box. If the flag value is one, the box is deemed to be a rotated-box and will provide more accurate collision feedback as the object rotates.

So I guess it is the same as DBC.

TDK_Man

Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 28th May 2007 15:32
oh but this is what got me confused : GET OBJECT COLLISION X ( for example ) This command will return sliding data for X if the rotated-box flag is zero. The rotated-box flag is set when you used the command MAKE
OBJECT COLLISION BOX. You must have used the make command in order to generate a return value here.
so should I worry ?

Could you help me treat my injured Dino-Fly ?
Twinsen
18
Years of Service
User Offline
Joined: 20th Jun 2006
Location: Romania
Posted: 28th May 2007 17:14
problem solved cause indeed it had to be set to 0 ... now the other problem remains : if I turn the box at 45" on the Y axis and I go through it, the object collision command is responding only when I'm 1/3 inside why is this happening ?

Could you help me treat my injured Dino-Fly ?

Login to post a reply

Server time is: 2024-09-26 22:46:04
Your offset time is: 2024-09-26 22:46:04