- Home /
Cant walk up stairs need a bit help more info inside.
i have some stairs made in blender with a ramp made but the problem is i cant make my model actually climb it falls down in the prossess of climbing,i use the third person controler that exists in unity for now due to my model flying off the map in a small ramp with it i also modified its script to have the scale up to 100 gravity *1f . If you got a better gravity model il appreciate it. It only needs crouch,walking,running and im still learning java so it will be a valuable lesson while at it. I got the animations so no deal in other stuff while at it :3 thanks for helping ^_^.
@Bryangs no but my controller it self has rigidbody.should i add a controller on the player?
Well the Character Controller can help a bit depending on your script. $$anonymous$$ost character scripts require a Character Controller component to work. The character controller has an option that make possible for you to walk in things more elevated, it's called Slope. The standard is 45, but you can change it to whatever you want. You should try it. Add a character controller to your model, and play a little with the slope limit and see if you can walk the stairs now.
while keeping the rigidbody it seems to make her levitate at the begining and also making her fly a bit as well when walking in them does it have to do with gravity?
I think i got it. Also your problem was "$$anonymous$$inda" solved, wasn't it? Anyway, this is probaly happening because your stair collider is flat a.k.a primitive.
By the way, @Cherno, look at this:
You know, it CAN work. I said CAN.
so then whats the solution? if she tries to walk on top of it she will either not climb it at all or use it as a launch pad.
I can only say that with the (first person) CharacterController setup waling on sloped is no problem.
I'm still not sure why you are using Unity's Third Person CC with a RigidBody. This is a big mistake.
Yep, first person uses both, and as you said this doesn't make sense so why is it even using both? Now you got $$anonymous$$E confused =S
I don't know what you mean by "why is it using both". The 1st Person CC included in Standard Assets is not using a RigidBody.
Answer by iAmAwsum · Dec 05, 2016 at 02:58 PM
Try creating an empty gameobject, adding a boxCollider to it and extending it diagonally up the stairs.
the problem though isnt the actual mesh/collider its that it uses that collider as it walks on top of it the gravity pulls her back to where she started and if used from top to bottom its using it as a slide
Try creating a lot of cubes, scale and disable their mesh renderers OR create a lot of empty game objects and put some colliders on them. Then use one cube/gameobject for each stair, ins$$anonymous$$d of using a single ramp.
correct mate,i changed my entire controller removed rigidbody placed on cc.
Answer by lylat · Dec 08, 2016 at 08:14 AM
Raising the step offset would also help you move up the stairs.
Because if you have lots of cubes, they might be slightly larger than the step offset in height which is what allows you to go over bumps that are beyond the slope limit.
Your answer
Follow this Question
Related Questions
Do character controllers work with dynamic gravity? 1 Answer
Does First Person Controller have infinite mass? 1 Answer
Wall Climbing and Default Gravity 1 Answer
Problem with character movement 2d when attaching animator 1 Answer
Why is my rigidbody getting stuck in the air when using mouse movement? 1 Answer