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 / Accuracy of object positioning when BSP collision enabled

Author
Message
APEXnow
Retired Moderator
23
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 19th May 2003 01:43
I've found a problem but I'm not sure if there's a solution, well not yet anyway.

First create an object like a sphere or load in an .x model, load a BSP file, any BSP file will do, then enable a BSP collision index on the object.

Now, if you move the object using this snippet.



Technically this should move the object up the Y axis by 0.001 repeatedly. If you check the position of the object after each Sync command, the object doesn't move. I've found that if you use numbers approximately larger than 0.005, it moves.

The lack of movement also applies if you use the MOVE OBJECT UP nObj, 0.001 command.

If you switch off the Bsp collision index for the object, it works fine again. Now the object isn't colliding with any BSP Geometry, hell you could position the object anywhere in BSP space and the problem's still there, so why does the object not move?

Could it be an accuracy thing when DBPro has BSP collision enabled on any object?
"Man who looses key to woman's appartment...... He get no nookie" - A wise chinese man.
APEXnow
Retired Moderator
23
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 19th May 2003 12:32 Edited at: 19th May 2003 12:34
I've been doing a little more experimenting with the object movement. From what I can see, any object that has BSP collision enabled, has a friction factor. I've setup a situation where an object can move around by accelerating along a vector based on the last position and the current position of the object each frame. If the object's BSP collision index is turned off, the momemtum of the object remains fixed. Turning the collision on for the object causes the object to slow down, eventually stopping.

Whether is is a math accruracy for the POSITION OBJECT command when collision is enabled, I can't tell.

Only Rich or Lee could probably answer this question since this is something to do with when BSP collision is enabled on objects.

"Man who looses key to woman's appartment...... He get no nookie" - A wise chinese man.
Mentor
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 19th May 2003 15:29
is this the bsp collision threshhold? (SET BSP COLLISION THRESHHOLD), the collision makes you slide slowly down ramps when you have it set to zero, maybe zero is not a true zero and there is still some friction enabled, to make an object move your force has to be greater than the colllision threshold, or the "friction" created by the command, or maybe for speed bsp only "does" the math to a couple of decimal places (though I don`t think thats so since the cpu would do math to internal precision just as fast), I think you may find it has something to do with the collision threshhold (IMO), cheers.

Mentor.

APEXnow
Retired Moderator
23
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 19th May 2003 18:13
i think you may be on the right track but whether I set the precision to 0.0 or 0.00001, it doesn't make any differentce. This is a question for the boys upstairs I think, thanks for the input though

"Man who looses key to woman's appartment...... He get no nookie" - A wise chinese man.

Login to post a reply

Server time is: 2026-07-11 04:24:10
Your offset time is: 2026-07-11 04:24:10