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 Physics & Dark A.I. & Dark Dynamix / Here is an improved character controller

Author
Message
GrumpyOne
12
Years of Service
User Offline
Joined: 27th Nov 2007
Location: London, UK
Posted: 3rd Jul 2010 21:57
Hi Everyone,

I'll post here rather than in code snippets since this forum is where everyone with a problem with Dark Physics looks first.

I'm new to Dark Physics and having encountered the same problems with the character controller as everyone else I've been feeling rather sorry for Mike. Everyone complains about the character controller, and I agree it would be nice if it worked like a controllable dynamic rigid body...but if it can't, it can't...however, DP provides lots of other really cool tools to make life easier.

I've read a lot of the posts on jumping/falling etc...and a lot of the solutions are rather awkward half fixes so I've come up with a new (perhaps) way of doing it. The principle is simple. When jumping and falling you generally don't need to control your character, so why not delete the character controller and turn your player object into a dynamic rigid body. Then when they land on something flat(ish) turn the player object back into a controller.

Anyway my code is below. It works fairly well with one or two little glitches mainly related to rotation when falling. No media is required. Screen shot attached. Use arrow keys to move.


p.s. It also allows the player to push dynamic objects about. That bit was easy.

GrumpyOne - the natural state of the programmer

Attachments

Login to view attachments

Login to post a reply

Server time is: 2019-12-06 22:52:33
Your offset time is: 2019-12-06 22:52:33