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 problems (fps movement)

Author
Message
Baiame
18
Years of Service
User Offline
Joined: 8th May 2006
Location:
Posted: 28th Jun 2006 16:44 Edited at: 28th Jun 2006 17:28
Hello. I tried stripping down the DBPro Newton Physics Wrapper FPS demo to only include the movement code (and initialisation). The demo doesn't work for me when compiled anyway (after the player moves a certain distance, he goes the same distance in the opposite direction, basically sliding around uncontrollably). I thought maybe I could figure out what was wrong after doing this, but I couldn't even compile it (crashed every time I tried). Any ideas on what I've done wrong? EDIT- I found out it has something to do with the environment loading part, but I'm still not sure what. EDIT2- Just noticed I accidently left in the old movement code, but that wasn't the source of the problem. EDIT3- Nevermind on that second problem, I noticed that I had omitted the "NeverCalled()" function (which I still don't really understand).



Also, I get screen flicker and a low (no greater than 30) FPS on anything compiled using Newton. I am using what I assume is the latest version of the Newton wrapper (from walaber.com) and the latest version of DBPro.

Thirdly, why bother using Newton at all (aside from the presumably greater speed)? I notice that just the movement code in the FPS example is about 60 lines, not including comments. I could easily code some simple, convincing FPS movement physics in much less than that. Why is it that you can't simply apply a certain force in a certain direction, then let Newton do the rest?

Thanks for any input.
QuothTheRaven
22
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 28th Jun 2006 21:11
By default the Newton world area is pretty small, only 100x100x100 units. If your object leaves the 100x box, it will no longer properly respond to physics because Newton doesn't check for anything outside the world area. Here's how to increase your world's size:


Top right and bottom left corners of the Newton world. You can replace those numbres with anything, I use 1000 and it works for me.

Baiame
18
Years of Service
User Offline
Joined: 8th May 2006
Location:
Posted: 28th Jun 2006 22:03
Thanks, but I since noticed that mistake (one among many, heh).

Strange, the movement code seems to work fine (no slipping) now that I took it out of the main source file for that demo. I still don't see what was wrong with it in the first place, but I don't suppose it matters now.

Login to post a reply

Server time is: 2024-11-26 17:23:34
Your offset time is: 2024-11-26 17:23:34