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.

Dark GDK / problem with dbIntersectObject();

Author
Message
Sephnroth
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 15th Apr 2005 02:24
Not sure if im doing something stupid or if its a bug. I have been trying to use dbIntersectObject() to position a model on the floor (which is made up out of planes) and I do this by raising my player 30 units from where they were then calling an intersectobject from their point to 100 units below them and move the character down by the distance returned by intersectObject.

Except what happens is my player model stays fixed where it is without moving at all (im guessing IntersectObject() is returning 0) even if i walk off the ground planes and into nothingness. If i however i change the intersect call to look 100 units ABOVE the player instead of below then she falls into infinity forever.

take a look at this code:



now have i written something stupid in there? or is this a bug?

this has been bugging me -alllll- day ><;

[07:16:59-pm] « Sephnroth » you were dreaming about lee...
[07:17:13-pm] « Mouse » stfu
[07:17:22-pm] « Mouse » he was hanging himself lol
Artus
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: France
Posted: 15th Apr 2005 02:40
I think the problem is that you should supply IntersectObject with the id of the floor object, not of the PlayerChar itself.
When you intersect with 100 above itself, IntersectObject(playerId..) will always find that the distance is 100 so the player will fall indefinitely...
Artus
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: France
Posted: 15th Apr 2005 02:43
Note: Each time I post something to the forum, I am informed that "Thank you for your post. As a new member your post will NOT appear until we approve it - read this to find out why." and my post appears hours later. When will I be approved automatically ? Is there anything to do for that?
Smithy
19
Years of Service
User Offline
Joined: 8th Dec 2004
Location: Switzerland
Posted: 15th Apr 2005 02:59
Can you insert a consoletext so you see what's the dbIntersectObject() is returning? Maybe the function is broken.
Just a thought, can't really help yet.

//Pentium IV 3200E/Prescott; 800Mhz FSB; Hyperthreading; WinXP Pro (!XP2); ATI R9700PRO; 1024MB RAM (2x 512MB "DualChanneled"; VC++ 6.0; Delphi; ADSL;
Sephnroth
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 15th Apr 2005 03:00
Okay, a guy called Artus sent me an email with a solution to the problem because posting on the forums is a bit bugged for him.

Just wanted to mention his name here so he gets proper crediting, it really helped me out

For those interested, I had to swap the player object id with the id of the floor im trying to detect XD

Thanks again, Artus.

-Seph

[07:16:59-pm] « Sephnroth » you were dreaming about lee...
[07:17:13-pm] « Mouse » stfu
[07:17:22-pm] « Mouse » he was hanging himself lol
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 15th Apr 2005 06:15
The forums aren't bugged. It's the standard post approval system that *all* new members go through.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk
Sephnroth
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 15th Apr 2005 06:20
hmm, post approval isnt a bad idea. But for such a system you really need a bigger base of mods that are active longer... waiting a few hours for my first post would probably of made me leave the community pretty snappish before because I would of had no help when i needed it most, on my first day. lol.

[07:16:59-pm] « Sephnroth » you were dreaming about lee...
[07:17:13-pm] « Mouse » stfu
[07:17:22-pm] « Mouse » he was hanging himself lol
Artus
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: France
Posted: 15th Apr 2005 16:59
I also fully agree with the principle of approval in order to protect the forum from spam-like posts. However, I have sent 5 or 6 posts since the beginning of March, and I still have to wait for approval each time. This does not favour reactivity when someone is stuck with a problem you have a solution for. I just wonder under which criterions or after how long is a member considered as "not new".
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 15th Apr 2005 21:23
I can't tell you ... but you are probably not too far off fulfilling the requirements - they are fairly light.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk

Login to post a reply

Server time is: 2024-04-18 09:08:22
Your offset time is: 2024-04-18 09:08:22