Hello I got a question, in the game engine. What if you want the character to follow the ground, but not be affected by gravity when he goes up hill or down hill. Like he goes faster when he is going down a hill and slower when he goes up a hill. But he still jumps according to the gravity.
In the image, the cube goes up the hill inside the room. And stops in the middle, then he slowly falls down again. How can you make him not fall down?? If you don’t understand tell me because my english is limited.
Really, isn’t it possible without scripting. Isn’t there anyone who has done this before who could tell me how you do this??:eek: It’s just like in platformers like spyro crock crash bandicoot etc…Or if scripting is the only way, maybe you could give me the script thanks for your cooperation :rolleyes:
What? No I want gravity, I just don’t want it to affect the character while he is in the middle of a hill…and there seems to be more people who got this problem. Where are the pro blender users!
If you only want gravity when the char and is in midair have a a property that when true makes a actuator trigger with a -9.4 Z force and turn gravity off in the world buttons.
Is it really that simple, sorry but I’m very new to logic briks. And I have no idea how to do what you just said. Please make a blend file please please
I got a small problem with that blend file. I made a hill, but still gravity affects the cube while it stops in the middle of the hill…maybe u misunderstood what my problem is :eek:
I’l try to explain again, ok we got a hill…it’s facing maybe 40 degrees or something. Now the cube is going up hill. And stops in the middle of the hill. Now I want it to stay there, but the gravity makes the cube go down hill again. Now I canät explain it better than that. You understand?
Physics lesson time! If you want to skip the physics, a solution to your problem is under this section:
When objects are pressed against something (like when an object is “pressed” against the ground by gravity) that something (ie, the ground) exerts a force back called the “normal force.” This is why objects don’t fall through the ground. The normal force is basically perpendicular to the surface (see attached image).
For example, when a ball is just laying on the ground, the force of gravity and the normal force are equal, therefore the ball doesn’t move.
The reason your object “slides” on slopes is because the force of gravity is creating a normal force that isn’t straight back up, but is perpendicular to the ground. Since there’s no force to counter-act the horizontal part of that “diagonal” force, your object
starts to slide. Not as fast as gravity, but pretty fast.
Friction is usually what keeps objects on slopes from sliding down. The force of friction is related to the normal force.
The way to stop your object from sliding is to give your ground a large enough amount of friction to counter-act the normal force. You can do that by assigning a material to the ground object, clicking the “DYN” button, and then cranking up the friction.
If you’re using Force to move your character, this will make it more difficult for your character to move up the slope, and he’ll probably go up it slower. I’d recommend using the Servo motion controls, they’ll give you a better result anyways.
Increasing the friction actually worked! Thanks alot that is exactly the effect I wanted. And now I can do it myself. Btw just a quick little question. How do you clear a rotation…and is there some kind of guide for all the shortcuts in blender like.