Okay I feel very dumb, I didn’t realize that the Rigidbody had a velocity parameter you could adjust:
rigidbody.velocity = new Vector3(Input.GetAxis("Horizontal") * Speed, rigidbody.velocity.y, Input.GetAxis("Vertical") * Speed);
So that solved my movement issue, but I am still having the wall sticking issue (where when you jump onto a wall, the character won’t fall until you press away from the wall). Any advice on that?
UPDATE 2: Electric Boogaloo It seems like Physics Materials helped my sticking issue. Now I have it to a point where everything is still sort of floaty but it works, and now that everything is basically frictionless… it makes it very easy to break the game in some areas. If there are any better ways to do this stuff, please I would still appreciate the input.
Basically, I’m going for a sort of 2.5D platforming control scheme with flat characters (sort of like Paper Mario). I actually have this working (with rotations locked), but I have one of two different problems:
transform.Translate(Input.GetAxis(“Horizontal”) * Speed * Time.deltaTime, 0, Input.GetAxis(“Vertical”) * Speed * Time.deltaTime, Space.Self);
This one actually works perfectly except, for the longest time, I couldn’t figure out why I couldn’t land next to a wall. I finally realized it’s because the rigidbody is physically trying to repel itself away from the wall collider, which makes sense.
rigidbody.AddForce/AddRelativeForce(Input.GetAxis(“Horizontal”) * Speed, 0, Input.GetAxis(“Vertical”) * Speed, ForceMode.???);
This one eliminates the wall bouncing problem however it creates several more. For one, I’m not completely sure which ForceMode I want? The main problem comes from the fact that a couple of them will either use it’s mass and take extremely high speeds to make it move (but then fly through the walls as soon as the character jumps because, you know, drag) or it will skip a step by not using mass and then just fly through a wall. Not to mention, this creates the problem of a very floaty character. The transform method isn’t perfect but it feels a lot more like an arcadey control scheme (which would be even better if I used GetAxisRaw()) but basically with the force methods it seems like the character will begin to move and I have no way to get him to stop until he basically feels like it.
Also, with both methods I seem to have issues sticking to the walls? Like if I hold the direction into the wall, it will continue to try moving until I let go, and THEN fall. I feel like this could be used for a good wall jumping mechanic, but unfortunately that’s not what I need.
Thank you for any help. :3