Hey all, just started using Unity3D a couple of weeks ago, loving it. One thing I’m curious about is if there’s some standard way to keep a player from “hopping” down a slope in a 3D platformer a la Super Mario 64. If I drop a First Person Controller prefab onto my level geometry, he runs around flat surfaces fine, runs up ramps no problem, but he doesn’t really follow the geometry running down a ramp. I noticed the player in the default island level did the same thing, it’s like all the slopes have a HopScotch component. :lol:
I can “fix” it by massively increasing my gravity, which of course messes up my jumping. I’ve already gone and done things in my engine to make things work only to find out as I keep reading that Unity3D has a built-in way to do what I went and did in script, so I’m just wondering what the standard approach is to correcting this behavior. I can’t imagine I’m the first person to notice this but most of my searches give some bug about going up slopes … thanks for the help.
EDIT: The way I found to try to fix this is to simply calculate the movement as normal, but before actually calling Move() I set movement.y to -1. Of course, I have to make sure he’s not jumping, and that he didn’t just walk off a ledge instead of down a ramp, etc. I’m not really sure how to check if they walked off an edge or just down a slope; CollisionFlags.CollidedBelow would be 0 either way right? Hoping there’s a better way … anyone?