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 / Newton raycast is detecting only one area of the level (FPS demo code)

Author
Message
the nameless
16
Years of Service
User Offline
Joined: 7th Mar 2008
Location: Hell
Posted: 13th Mar 2008 22:19 Edited at: 13th Mar 2008 23:26
Ok, here`s someting that really puzzles me- I`m using the FPS demo from the Newton wrapper. I decided to create my test level (named "buggylevel.dbo). The strange thing is that the ray we use to detect if there`s any ground or any object below the player works only in one part of the test level- it`s not working in the area I`ve marked with pink lines.

Any idea why should this happen? I tried different compositions, different levels, different types, but it still doesn`t work for the whole level.

Please take a look an tell me what do you think...

http://filebeam.com/82154f9d69c04fc409f4304b6f50133b
pirate
18
Years of Service
User Offline
Joined: 18th Apr 2006
Location: u.s.a
Posted: 14th Mar 2008 10:12 Edited at: 14th Mar 2008 10:39
hello nameless,
i think your problem is with positioning the object..if you look at this code at the bottom you will see that it says that for this demo we will leave the room positioned at 0,0,0....i believe if you changed this position and played around with the x position you will find the right spot...since i do not know the size of the model it would be hard for me to tell you where to put it...




position it with negative numbers to move it left or positive to move it right...similar to this....
position object obj, object position x(-1000), object position y(0), object position z(0)
it also says to position the rigid body..i do not know how to do this because i have never used newton...

i'm not sure this is your problem but i hope it helps...pirate

thanks, pirate
the nameless
16
Years of Service
User Offline
Joined: 7th Mar 2008
Location: Hell
Posted: 14th Mar 2008 14:15
@pirate:

This is an idea. Unfortunately it`s not working...
When I move the level the detection area is moving in the same world coordinates.

It seems like there`s something like a global world size limitation (of the type -100,-100 to +100,+100) for the ray cast detection. In the original version the level is about 10 times smaller than mine and the whole level is in the "working area". No clue...

Any other suggestions?

Hmm and I`m wondering which program was used to create the original level with those lightmapped textures...3d world studio?
the nameless
16
Years of Service
User Offline
Joined: 7th Mar 2008
Location: Hell
Posted: 14th Mar 2008 15:41 Edited at: 14th Mar 2008 20:57
and here`s absoultely the same example, the same original level, just moved on posx#+1000. The ray detection is not working. Try moving it -1000 (as in the original without touching the code and it will work for the square area-for example -100,-100 to +100,+1000...

Is it a bug or a misunderstanding of me?
the nameless
16
Years of Service
User Offline
Joined: 7th Mar 2008
Location: Hell
Posted: 14th Mar 2008 16:42
Nevermind. I fixed it by myself. It seems like Newton needs a pre definition of his worlsd size.

Admin, please delete ths topic, since it`s useless... Thank you!

Login to post a reply

Server time is: 2024-09-27 12:14:51
Your offset time is: 2024-09-27 12:14:51