I’m trying to build a game where you can grab any platform under you at any inclination. While the player is grabbing the platform, they should be able to move parallel to their inclination.
rb2d.transform.position = rb2d.transform.position + new Vector3(moveHorizontal * Mathf.Cos(rb2d.rotation), -moveHorizontal * Mathf.Sin(rb2d.rotation));
However, my character seems to be moving in seemingly random directions on any surface that isn’t horizontal. What error did I make?
Thanks for the attention.
EDIT: Also, is there a way to implement more strictly the game’s collision detection? My character phases through rigidbodies.