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 / Desperately need help - player / world collision problem

Author
Message
i lyke pineconez
15
Years of Service
User Offline
Joined: 16th Aug 2010
Location:
Posted: 18th Sep 2010 08:43 Edited at: 18th Sep 2010 11:24
Okay, I've posted this several times in different forums, but noone can tell me what the problem is here.

Background info:
1. I am using sparky's collision dll for my collision.
2. The code i am using for my collision is straight out of the sliding demo provided with the dll.
3. (If it matters)I am using 3DWS to make my world.
4. The problem ONLY occurs when i use the .dbo format, which just happens to be the format I REALLY need to use. (It works perfectly fine with a .x file)

The problem:
When I execute my program in debug mode, the world loads as normal and my player appears in the world. When my player touches the ground, he shifts up and down slightly, and their coordinates seem to be rapidly decreasing by 6, and then increasing by 6, repeating, and causing a really annoying shifting problem. However this isnt the only problem, whenever I press W to move my charachter forward a bit, my map disappears, and my players coordinates become "1.#QNAN". I do not know what this means, as i am pretty new to programming in dbpro, but im assuming it is saying the coordinates i asked it to move to do not exist.

This is the code i am using:


This is pretty hard for me to explain correctly, so if anyone doesnt get what im trying to say here, please let me know and i'll try to elaborate. Any help on this matter is greatly appreciated.
Dia
21
Years of Service
User Offline
Joined: 16th Jan 2005
Location:
Posted: 18th Sep 2010 10:06
you are right, it is hard to explain correctly, but rather than upload a video (which can also be hard to decipher) just attach your code

This is not the Sig you are looking for....
i lyke pineconez
15
Years of Service
User Offline
Joined: 16th Aug 2010
Location:
Posted: 18th Sep 2010 11:18
Edited first post to include the code.
Dia
21
Years of Service
User Offline
Joined: 16th Jan 2005
Location:
Posted: 18th Sep 2010 17:37 Edited at: 18th Sep 2010 17:37
I dont have your terrain object, so I tried your code using one of my dbo terrains(see screenie attached). I didn't have any real issues with it at all, the motion of the sphere was pretty smooth and in control

the only way I was able to replicate similar symptoms was by lowering the terrain height (or running off the edge) so that your line 'if oldy#<-50 then oldy#=100' came into play, meaning basically that the sphere (player) was getting teleported 150 units up and staying in freefall (continuing to increase its downwards speed )

Can I ask what height (y position) your terrain ranges between? if your terrain has any features below this threshhold then that might be where your problem is coming from

This is not the Sig you are looking for....
i lyke pineconez
15
Years of Service
User Offline
Joined: 16th Aug 2010
Location:
Posted: 18th Sep 2010 19:43 Edited at: 18th Sep 2010 19:43
Then somehow, it might be the object im using or something, i have no idea, but it occurs on ALL of them. I have attached the object that im using.

the 'if oldy#<-50 then oldy#=100' line is there just in case the player falls through the map at any point, which i have experienced before, and this was the only work around I could think of. I have tried getting rid of it, but it still did the same thing.

The terrain ranges between 0 and 4126, and it has no areas that go below this.
Dia
21
Years of Service
User Offline
Joined: 16th Jan 2005
Location:
Posted: 19th Sep 2010 04:31
hrmmmm... the object you sent me works just fine on my box.

Is there anywhere in particular you have the issue? or does it happen wherever you happen to be standing?

This is not the Sig you are looking for....
i lyke pineconez
15
Years of Service
User Offline
Joined: 16th Aug 2010
Location:
Posted: 19th Sep 2010 05:07
to me it happens exactly where the player spawns. maybe its my system? is there any Win7 incompatibility?

Other than that i guess i'll just have to try around with it till i find whats wrong. Oh well, thank you very much for your time.

Login to post a reply

Server time is: 2026-07-22 22:07:22
Your offset time is: 2026-07-22 22:07:22