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 / Newton Player Control Help

Author
Message
DB PROgrammer
19
Years of Service
User Offline
Joined: 9th Feb 2007
Location: Nowhere But Everywhere
Posted: 6th Oct 2010 08:47 Edited at: 10th Oct 2010 06:21
Hey guys... I haven't been on here for like, ever. I'm back though, maybe... lol.

I've been attempting to make 3rd person movement using Newton but it's just not working. Has anyone ever got this to work decently?

CodeSorry if this has a small bug or two. I took the basics out of my main project to show, but being I'm not on Windows ATM, I have no way of testing.)


The basic theory behind my control is to use an upjoint for the player object, apply forces to the sides/front/back to move it, and so far I haven't even got a half decent way of turning it.

My problem is that everything is working horridly. I can't get the player to move, either without it being to slippery, or not working half the time; even then, staffing causes my player to spin/turn when I don't want it to. Turning I could probably get, but if the movement isn't going to work it's not even worth the effort to me.

So, has anyone gotten 3rd person movement working decently with Newton? If so can I get an example or maybe get some help with my code?

Thanks a lot for reading!

tiresius
23
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 6th Oct 2010 16:17
Is third person movement the same as first person with just a different camera position? There is a FPS demo with the Newton wrapper. Many people have struggled with character controllers and Newton (1.53 isn't really ready out of the box for it) so I don't know if anybody has gotten it to work perfectly.

I think an important thing is to use an up-vector joint on a capsule and separate out the collision from the model. In other words: it doesn't quite matter where the capsule shape is facing, it is just used for collision with walls/floors/stairs. You will run into all sorts of friction issues with sliding collision and it will just be a mess. Newton 1.53 does not lend itself well to direct control of a physics object, and that's basically what a character controller is.


A 3D marble platformer using Newton physics.
thenerd
17
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 6th Oct 2010 21:07
I have the exact same problem, I can't figure it out...my character controller always behaves as if there is no friction and it slides everywhere.

Here's what I have for code, it's basically the same as DB Programmer's except in functions so it's easy to read. (Attached because it's sorta long)

DB PROgrammer
19
Years of Service
User Offline
Joined: 9th Feb 2007
Location: Nowhere But Everywhere
Posted: 10th Oct 2010 06:23
Thanks for the input guys. My computer has started messing up, but once I get that fixed I'll try to study the fps example. I'll make sure to come back if I have any questions.

Thanks again

Login to post a reply

Server time is: 2026-07-22 03:51:41
Your offset time is: 2026-07-22 03:51:41