Rigidbody2d.addforce replacement for version 5

I am a total newbie working trough some tutorials and the tutorial uses:

Rigidbody2d.addforce (new Vector2 (forceX, forceY));

to apply for to a player object. This seems to have been removed from Version 5.

Can someone point me to a replacement method?


Check out my answer HERE, that should suit your need unless you add force from script which is not a component of that rigidbody’s object (if so let me know in the comment section below).

The only difference (with the code I’ve linked) is that you should use Rigidbody2D instead of Rigidbody and Vector2 instead of Vector3.