character control questions

I was trying to figure out a good character setup, and I ran into two problems.

  • When I go up a ramp, like I’ll use for stairs and uneven ground, my character kind of flys off the ramp, and I want him to just stop.
  • I want my character to only move by momentum, and not be controllable when in the air, so i tried makeing a ray facing down so if the ray in’t positive you can’t move the character. This work except when the character is too close to the edge or in some positons on the stair ramp.
    So does anybody know how to fix these simple problems. I hope I was clear enough, and here’s the blend.

Attachments

character_setup.blend (135 KB)

someone must know something.

I’ll take a look at it!

thank you.

Anybody have an idea?

Try a collision sensor instead of a ray.

If I have a collision sensor I will have to have to have a different object for any ground I want, so that when I add the jump controls you can’t just fly up the walls. If no one has a better idea I’ll just have to do that.

A collision sensor is usually used to detect if you’re on the ground. What you can do to easily disable motion when not touching the ground is use states.

Use a collision sensor with the “inv” option set, and change the state to state 2 (Cpy, select the 2nd one). Then use a normal collision sensor to move your character back to state 1.

As for flying up… you’re really just going to have to play around with settings. Mess with gravity, the force you’re using… etc.

-Sam

ok, so do I need seperate objects for the walls and for the floor? I don’t want to make things more complicated than they need to be.

The easiest way would be to just separate the walls.

Ok, thanks Magnum.