Im trying to make a boss for my 2D side scrolling game. I have an object that contains the player and main camera and they are all constantly moving to the right. I want to add a boss to this but if its moving up and down like i made it, it wont go to the right with the main camera.
Hi,
so what I make up from the image you provided, you’re not changing the x-position in this script, is that meant to be? Do you want the boss to move along with the camera? Or do you want to let the camera move along with the boss?
If you want the boss to move right, you could try adding this in the next line:
transform.position += new Vector3(speed * Time.deltaTime, 0, 0);
Hope this helps, but don’t hesitate to point out mistakes or to reformulate the problem ![]()
transform.position += Vector3.right * speed * Time.deltaTime;
