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 / An idea for character controller gravity.

Author
Message
CocaCola
14
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 24th Jun 2011 19:19 Edited at: 24th Jun 2011 19:34
As we should all know, gravity affects the character controller when it's moving, so in turn if you do this:

Before you sync it should work right? Well that makes you're character move downward constantly REALLY fast.
So what if we made a timer system and did that every X seconds/milliseconds to control gravity and say if you're in air then you can't use the movement controls?
Then with that we could make an if statement asking if it's touching ground or not so it's not constantly moving downward.

Just an idea, but what do you think about it?


EDIT: Something like this, though this doesn't quite work:


Always program as if the person maintaining your program is a psychopath that knows where you live
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 24th Jun 2011 19:38
one way that would solve the gravity of problem.

can you try this in your code.

phy move character controller 1,0

were you would put your above idea, just want to know if this does anything or if the character just stays where it is.

Dark Physics makes any hot drink go cold.
CocaCola
14
Years of Service
User Offline
Joined: 23rd Mar 2010
Location: CocaCola.x CocaCola.y CocaCola.z
Posted: 24th Jun 2011 23:19
That causes it to move downward VERY slowly.
So I suppose phy move character controller 1,0.5
then stop the movement if your in air would work.

Always program as if the person maintaining your program is a psychopath that knows where you live

Login to post a reply

Server time is: 2024-04-20 09:54:03
Your offset time is: 2024-04-20 09:54:03