- Home /
Question by
GameDevStuff · Jan 25, 2015 at 07:13 AM ·
'ridgidbody2D' unexpected symbol? Help please.
This is my code:
// If the player should jump... if ((grounded || !doubleJump) && jump) { // Add a vertical force to the player. anim.SetBool("Ground", false);
rigidbody2D.velocity = new Vector2(rigidbody2D.velocity.x, 0)
**rigidbody2D**.AddForce(new Vector2(0f, jumpForce));
if (!grounded)
doubleJump = true;
The ridgidbody2D with the two asterix is the one with unexpected symbol error attached to it. Any help would be greatly appreciated. :)
Comment
Answer by tanoshimi · Jan 25, 2015 at 07:14 AM
You're missing a semicolon at the end of the line above.