Hi all,
I am so close to completing the Laser Defender section of the course. However, I tried to add a rotation to my ‘big boy’ enemy bomb, and I am seeing something totally different from the tutorial. Instead of falling and spinning, mine have started floating up while rotating around a central point. Here is a video of the behavior I’m seeing:
The code I have to move my bomb is the following:
void Update()
{
MoveDown();
}
private void MoveDown()
{
this.transform.Translate(Vector3.down * _speed * Time.deltaTime);
}
The code I have for the spin function, also attached as a script to my bomb is:
{
[SerializeField] float _speedOfSpin = 1f;
// Update is called once per frame
void Update()
{
transform.Rotate(0, 0, _speedOfSpin * Time.deltaTime);
}
}
I’m really not sure where to start, as I have no idea why Vector3.down would somehow change to an upward motion.