Hey
I’m just curious if its possible to create a new rotation (X,Y,Z) and for use when instantiating something
For example
var relativePos = target.position - shotSpawn.position;
var alt_Rot = Quaternion.LookRotation(relativePos);
var new_Rot : Vector3;
new_Rot = new Vector3(90, alt_Rot.Y, 0);
Instantiate(object, @position, new_rot);
The reason being is im having trouble with a quad (laser texture on it)
When using this
var relativePos = target.position - shotSpawn.position;
var rotation = Quaternion.LookRotation(relativePos);
shotSpawn.rotation = rotation;
Instantiate( projectile, shotSpawn.position, shotSpawn.rotation );
the bullets shot at the target, but the rotation of the bullet gets changed ruining the look.
I want to preserve the X rotation of the bullet