So I have this code:
Instantiate(_laserPrefab, transform.position, transform.rotation);
And laser appears here:
Then I try to make the laser match the tip of the spaceship, and do this:
Instantiate(_laserPrefab, transform.position + new Vector3(0, .7f, 0), transform.rotation);
And I get this when x axis is 0:
But… when player rotates… something like this:
Obviously laser is rotating but not attached to the spaceship.
Is there some method that I’m not aware of that will adjust laser not only in rotation, but also position relative to the spaceship?
Thanks for the help!