Question by
AGO12 · Feb 07, 2018 at 11:48 PM ·
c#rigidbodytutorialspace shooter
The bolt doesn't move
So I was doing the arcade spaceship shooter tutorial from the unity site, and I've run up against a problem.
When I place the object into the game to test, the bolt doesn't move.
This may have been a mistake I made by trying to update the code to v5, but I can't see it.
My code: using System.Collections; using System.Collections.Generic; using UnityEngine;
public class Mover : MonoBehaviour { public float speed; private Rigidbody rb;
void start ()
{
rb = GetComponent<Rigidbody>();
rb.velocity = transform.forward * speed;
}
}
Comment
Your answer
Follow this Question
Related Questions
My shots don't want to move! 1 Answer
Get horizontal velocity of an object 2 Answers
Using Rigidbody.MoveRotation 0 Answers
Why is my character sliding? (Rigid Body) 1 Answer
Pick Up and Drop Script not functioning due to loophole 1 Answer