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 / problem with sparky's collisions SC_drawObjectBounds

Author
Message
lean
13
Years of Service
User Offline
Joined: 18th Dec 2010
Location:
Posted: 21st Dec 2010 03:09 Edited at: 21st Dec 2010 05:27
hello, i'm having a weird problem when using de drawobjectbounds command with a loaded model, what happens is that when the bounds are drawn they aren't aligned with the object, instead their Y position is greater than objects Y position. The weirdest thing is that the collisions DO work, so the bounds are set in the same place as object, they just seem to be shown in the wrong place.



please help? how can i fix it?

here's the code i wrote to check just that problem, isolated from everything:



it draws the bounds perfectly when using "make object" so i thought it could be a problem with the model i used in "load object", but i tried with others, including the miko.x model that comes with dbp and the problem persists. so i think it must be something wrong with the coding i guess..

i tried as a complex object, as a box collision, sphere collision, nothing there seams to work. i thought that sc_updateobject might fix it, but not even that.

again, the collisions work, so it's just the bounddrawing.

maybe it's SC version? its v 2.05

dark basics version is:
editor: build oct 8 2009
compiler: v 1.074

Attachments

Login to view attachments
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 21st Dec 2010 13:37
Have you tried using the native command for "show object bounds"?

I just wonder what the results are for the same model? Could be sparky's isn't the problem here...

lean
13
Years of Service
User Offline
Joined: 18th Dec 2010
Location:
Posted: 21st Dec 2010 15:40
hi, and thanks for your answer.

I tried with native "show object bounds" and it works fine, the bounds are shown in the right place. so i guess that it's a sparky's collision problem, or something i'm doing wrong with it.

any clue? is there more information i should post in order to get help?

by the way, english is not my first language so, sorry if what i write is hard to read.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 21st Dec 2010 16:01
Quote: "I tried with native "show object bounds" and it works fine, the bounds are shown in the right place. so i guess that it's a sparky's collision problem, or something i'm doing wrong with it."

In that case it looks like a bug and one I'm not aware of. I'll take a look into it but I would take a look on the "dll talk" forum and see if anyone else has reported it. Try doing a search using the search feature at the bottom of the page.

Sorry if you already did that but it's normally my starting point for any 'new' problems

Quote: "by the way, english is not my first language so, sorry if what i write is hard to read"

Your English is excellent, don't worry about it!

lean
13
Years of Service
User Offline
Joined: 18th Dec 2010
Location:
Posted: 21st Dec 2010 16:57
hello again, i've searched the forum before asking and found nothing. anyways it seems i missed a thread in that moment, because when i searched again minutes ago, i found a thread from a guy with my exact same problem:

http://forum.thegamecreators.com/?m=forum_view&t=158050&b=1

anyway, the solution they gave him doesn't exactly work. offsetting the main limb so it matches the bounding box will cause that the collisions won't work right anymore: as what i've moved is the main limb and not the real object, the collisions will be offsetted. anyways, this solution doesn't even make the object exactly match the bounding box.

my theory is this:



there's a real bounding box, that works fine, in the right place, but for some reason the visible bounding box is shown in the wrong place. when i offset my main limb to match the visible bounding box, the real bounding box will remain the same, as i didn't move the OBJECT, ergo: the collisions won't work right.

i'd like to fix this, so i can run tests on my collisions and understand problems and such...
lean
13
Years of Service
User Offline
Joined: 18th Dec 2010
Location:
Posted: 22nd Dec 2010 04:08
any clue? no? no one using sparky's collision system solved/had this problem?
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 23rd Dec 2010 09:49
Apparently not. You could try posting this bug (and a link to this thread) on the dll thread. The guy who made the plugin might have a solution...

Here: http://forum.thegamecreators.com/?m=forum_view&b=5&t=74762&p=9

lean
13
Years of Service
User Offline
Joined: 18th Dec 2010
Location:
Posted: 24th Dec 2010 03:04
alright, thank you very much for your help, baxlash! i'll do that.

thanks.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 25th Dec 2010 18:03 Edited at: 26th Dec 2010 15:25
I got DBP quite a while back and I never received a Miko.x file. However, I do have DarkMatter and I used one of those models with your code and it worked fine. I changed the filename on it and ran your code. Here is a pic:




I suggest that you upgrade to DBP 7.5 (noticed you are still running 7.4). It may work, and it may not, but it's worth a try. 7.5 is better anyway IMO.

EDIT: After further review (been watching too much football I guess, LOL), I found this same issue in one of the games that I am working on. I edited the model in a modeling program and moved it to where it is halfway down the Y axis and it fixed the problem.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-04-20 01:55:20
Your offset time is: 2024-04-20 01:55:20