Make RigidBody2d.AddForce() not relative to sprite's rotation.

I have a ball as the character for a game that I am creating and I move the ball by using RigidBody2D.AddTorque(). The only problem is when I want the character to jump using RigidBody2D.addForce(transform.up), it jumps up relative to its rotation. How would I make always jump towards the top of the page?

Use Vector3.up instead of transform.up.

While transform.up gives you the “local up”, meaning the direction that is “up” to the object form its point of view, Vector3.up is “world up”, simply (0,1,0) independetly of any objects.