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 / Alternative Character Controller

Author
Message
Dark Fire
15
Years of Service
User Offline
Joined: 23rd Jun 2008
Location: In the code you write
Posted: 8th Jul 2009 00:57 Edited at: 9th Jul 2009 22:05
I have made a character controller and would like some help perfecting it.

When you jump it descends slowly to the ground. I have no clue how to fix this. I tried to increase the gravity, but jitters when on the ground. I also tried speeding up the simulation, but that doesn't speed up the descent my much.

Here is the code:



Problem Solved:
Here is the code I have with the jumping added:


New Questions and ideas:

How can I crouch the object and size the object on the y axis so it will return the correct ray cast response?

Wouldn't you have to size the object then use: Phy Delete Rigid Body then: Phy Make Rigid Body Dynamic Box again?

After figuring out crouching how would I crouch jump?

In halo 2 you would press it right after you jump.

How would I figure out when I would accept the executed crouch jump?

Would I be able to execute the jump when I reach a certain height and will only work if it is under a certain height?

Like this: Crouch Jumping will only work between these heights off the ground: 11 and < 12.

Would this be the correct way of doing this or would timing be used?

Is there a smoother way of jumping? (seems like the impulse of the force is causing the problem) (I don't want to use velocity though. Velocity will cause collision problems.

I also have been trying to figure out how I would hang on a ledge.

I would have to figure out how to calculate if there is a ledge in front of the character.

Then I have to figure out how to grab on it and move down a bit after grabbing on.

After that I would have to figure out how to pull the character up and over the wall.

The last thing I would have to figure out is the character's stamina related to how fast he can run, but that is the easy part.

Thanks,

Dark Fire

My future self met up with one day to teach me what I know today.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 8th Jul 2009 12:54
Now this might work, once the logic for it is sorted, which I cannot work out. which is if you have jumped and you are not pressing the jump key then revese the force speed and double it.



Dark Physics makes any hot drink go cold.
Dark Fire
15
Years of Service
User Offline
Joined: 23rd Jun 2008
Location: In the code you write
Posted: 9th Jul 2009 22:02 Edited at: 9th Jul 2009 22:03
@HowDo - I thought of this already I just couldn't get it to stop bouncing up and down because of the force and the gravity. Having it only while I am in the air is the part I didn't think about even though it was so simple. Originally I just wanted to fix the simulation to be more realistic for objects descending.

Now I several other questions:

How can I crouch the object and size the object on the y axis so it will return the correct ray cast response?

Wouldn't you have to size the object then use: Phy Delete Rigid Body then: Phy Make Rigid Body Dynamic Box again?

After figuring out crouching how would I crouch jump?

In halo 2 you would press it right after you jump.

How would I figure out when I would accept the executed crouch jump?

Would I be able to execute the jump when I reach a certain height and will only work if it is under a certain height?

Like this: Crouch Jumping will only work between these heights off the ground: 11 and < 12.

Would this be the correct way of doing this or would timing be used?

Is there a smoother way of jumping? (seems like the impulse of the force is causing the problem) (I don't want to use velocity though. Velocity will cause collision problems.

I also have been trying to figure out how I would hang on a ledge.

I would have to figure out how to calculate if there is a ledge in front of the character.

Then I have to figure out how to grab on it and move down a bit after grabbing on.

After that I would have to figure out how to pull the character up and over the wall.

The last thing I would have to figure out is the character's stamina related to how fast he can run, but that is the easy part.

Here is the code I have with the jumping added:


My future self met up with one day to teach me what I know today.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 10th Jul 2009 11:36
have you tried it with phy set rigid body linear momentum ID, x#, y#, z#, this might work diffrently , or adding the damping code to the object.


Have to think about the other stuff.

Dark Physics makes any hot drink go cold.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 10th Jul 2009 14:22
Quote: "How can I crouch the object and size the object on the y axis so it will return the correct ray cast response?

Wouldn't you have to size the object then use: Phy Delete Rigid Body then: Phy Make Rigid Body Dynamic Box again?"


read this again and thought sound lioke another object, so why not have that when you crouch you put that object in the system when finshed put the other one back.

other stuff, well anyone guess.
ground zone?

Dark Physics makes any hot drink go cold.

Login to post a reply

Server time is: 2024-04-26 04:18:58
Your offset time is: 2024-04-26 04:18:58