Unity wont let me do:
GameObject crate = (GameObject)Instantiate(cratePrefab, transform.position + transform.forward * 100, Quaternion.identity);
GameObject crate = (GameObject)Instantiate(cratePrefab, transform.position* transform.forward , Quaternion.identity);
GameObject crate = (GameObject)Instantiate(cratePrefab, transform.position* transform.rotation , Quaternion.identity);
Is there a way to make these work? I’m looking to fire a bullet out of an object and go the direction the objects currently rotated towards?
I get the error:
Assets/Turret.cs(18,120): error CS0019: Operator *' cannot be applied to operands of type
UnityEngine.Vector3’ and `double’
or
Assets/Turret.cs(18,99): error CS0019: Operator *' cannot be applied to operands of type
UnityEngine.Vector3’ and `UnityEngine.Vector3’
Thanks