uphill,ramps,incline character navigation

This is just driving me crazy to the point i don’t think its possible to set up a convincing method for your character to walk ( third person styled character) up a ramp. So after a couple days of wasted hours i figured I would ask the community for some help. I have no python knowledge. IF i did i’d see if you chould get the normal of the plane my character was in contact with and adapt the force vector so the velocity magnitude would be constant, but alas no knowledge.

I’ve searched around and played with the physics/material to a good extent. Issues stopping at the base of the ramp. Fix that by using forces, but not moving on the ramp is subject to friction resisting your motion or allowing you to slide back down the incline.

The subject title is such to hopelfully stear later people here incase a good method is proposed.


i have the same problem and little python knowlege. I tried to disect Socials walkthrough demo for an alternative for DRot ( which i think is the problem) but i couldnt tell what motion setting he used. Maybe he will read this.

If you don’t mind, pass on a .blend and let’s see if we can’t get this solved.

here (the floor has no properties assigned , the character is set up to run the walk cycle with w, but no forward motion is being applied) Right click the cylinder around the character and apply the force/velocity/dloc to the cylinder , the character is parented to the cylinder)
https://mywebspace.wisc.edu/jgphillips/web/g_charpack.blend (right click save target as)

Pouncing @$$ action pose
delete the ground plane and make a new one something’s up with the one in the blend

Sorry, but I can’t download your file. I think it might be your school’s settings. Another host might help.

Heres a quick dirty example modified from a Sticky .blend


Just add animation.

fixed my file.

there’s a hidden bonus scene in the blend you attached quite funny

this character here, can walk in many ways…maybe
If you want to check:
http://otothecleaner.free.fr/downloads/otopushing-collisions.blend 4Mb

i’ve yet to putt any ramp in your blend oto but since your using dloc to move i don’t think it’ll matter. The blend you posted unsett is closer to what i’m after it has ramps good constant speed, and no sliding back down the ramps, but it still has that ice skating effect. If you try and apply those setting into my blend the ice skate effect will be extremely noticable with a walk animation running

Yeah, same here

I’ve been thinking and my head hurts but here is the way i believe this could be over come.

First problem initial slidding - This happens because you are applying a force on a motionless object overcoming the initial (static friction thing ) friction and then reaching the max velocity takes time. During this start up time your feet move too quickly and you get a starting on ice effect. This occurs when using a Force to move your character.
Using velocity and dloc takes care of this startup sliding.

Slidding when not giving a command - After appling a velocity or a force your charcters Kinetic energy (energy related to motion) has to be dissipated before the characters stops moving. So again you get a sliding effect at the end of motion

Dloc doesn’t have this problem

And ofcourse getting on ramps - difficult using velocty or dloc and partial difficult for high velocity resulting from a high force. So small forces get the character on the ramp.

And my idea for a grand work around if a python knowing individual accepts it

Over coming initial slide this can be done by a quick swap a velocity for force. The initial velocity should be set to equal the max velocity the force can create on your charcter depend on mass and the friction. Then stop inputting velocity and input the force.

Second problem- easy enouch (i think using a touch sensor and script) Touch sensor checks to make sure your charcter is in contact with the ground. The script check to see that no keyboard input is being pulsed and then sets the velocity to 0. Effect killing the stopping slide

Since a Force has been established for the ground plane, ramps should simply need the proper friction coefficient to create a similar max velocity to the ground and to keep a character from sliding down. This can be handled from experimentation.

If you see anything wrong or not doable speak up or if you can think of easier ways just to get some ideas stirring

I’ve almost got it with a simple logic brick setup I’ll check some ramps and post my blend if i can get it to work.

edit ok use the link i post prior its in there.
I 'll go ahead and explain the set up so if my file’s gone this will still be here to explain.

first logic brick connection is to defeat the initial slide problem

keyboard sensor (W)… - AND -… Motion (run_velocity)
Property (runstart)… /xxxxxx… Property (runstart + 1)

W is setup for my forward run
Motion is giving only the corresponding initial velocity that i want my character to take off at.
I’ve add a property lets say runstart and set it equal to one
The sensor Property(runstart) is set to see if runstart is equal to one
Property (runstart +1) is adding a 1 to run start

Ok so if my property added to my moving object equals one and the W key is pressed then a velocity is applied to my object and the runstart property is changed. By changing the property the moment the key is pushed you only get a single pulse triggering the velocity. Then the W key no longer supplys any velocity since the runstart no longer = 1.

Next is the swap stage where I’m applying a force using W

Keyboard (W)… - and -… Motion (the coreesponding force)

This is so my character motion will be dependent on forces and not velocity so he can climb/get on ramps

Next is a no slide set up plus my way of reinitializing the runstart to one that way you can keep creating initial velocities.

Keyboard (W) inverse …-- AND --… Motion (stopvelocity)
Collisioin (with floor)… / xxxxx … Property (runstart assign)

W (inv)erse in the keyboard sensor is sending a pulse when W is not pressed. Collision is checking for a property (floor) on any object my character is colliding with. So if my character is not pushing W and is in contact with an object with the property floor, the motion actuator is giving a .001 velocity (nearly stopped) and my property runstart is being assigned 1 again to allow for a new run start at my initial velocity.

I’ve attached a floor property on all surface my character can walk on. The thing to do is set up a decent friction valjue in the dyn in the materials section. The flat plane will need the largest friction factor. The friction of the plane is what is slowing your character down. You need more force to climb incline plains at the same velocity as to travel the level ground and to simulate this you will need a lower friction for the inclined planes than for the ground plane. Also remember you need low Forces to get on the ramp so don’t start with forces exceeding 100.

Ok jesse,
I just got finished messing around with the preview Erwin posted for the next release and I have good news. Besides the awesome addition of constraints your problem will be fixed and you will be able to use dLoc without jerky motion. That was what caused your character to jump off of your ramp instead of going forward. This is good news for all of us!

That isnt good news. Its great news.