Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Alternative to ForceMode2d for Unity 4.3.7p3?

Discussion in 'Scripting' started by SoloWanderer, Mar 2, 2015.

  1. SoloWanderer

    SoloWanderer

    Joined:
    Jan 28, 2015
    Posts:
    20
    I'm following a tutorial, and the guy uses the following code.
    Code (CSharp):
    1. public ForceMode2D fMode;
    In the version of Unity I’m using (4.3.7p3) I get an error that says
    The type of namespace name ‘ForceMode2D’ could not be found.

    The only time fMode is used is in this line of code:
    Code (CSharp):
    1. rb.AddForce (dir, fMode);
    rb is a Rigidbody2D.

    So, is there some alternative code I could use?