- Home /
Question by
abhishek7 · Aug 08, 2014 at 03:39 PM ·
rigidbody2d
unexpected symbol 'rigidbody2D'
using UnityEngine;
using System.Collections;
public class RocketScript : MonoBehaviour {
public Vector2 speed = new Vector2(0, 20);
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void FixedUpdate () {
if (Input.GetKeyDown(KeyCode.UpArrow)
rigidbody2D.velocity=speed;
}
}
thats my code and it keeps saying that. Whats wrong with it? Any help would be appreciated.
Comment
Best Answer
Answer by robertbu · Aug 08, 2014 at 03:45 PM
You are missing a ')' at the end of line 15.
Your answer
Welcome to Unity Answers
If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.
Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.
Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.
Follow this Question
Related Questions
Animations don't Update 1 Answer
Make Enemy movement "superior" to player movement. 1 Answer
[Networking] Sync child rigidbodies 0 Answers
Unity 2d Physics Collision Jumping / Glitching 0 Answers
Unity2D Can't implement wall jumping ! 0 Answers