Hi, I am trying to fire a raycast from the centre of my screen and am experiencing problems. I've attached a video and code. ^ Although the video is short and very quick, it should show that the projectile is being shot from my position, but not factoring in any direction. Code (CSharp): if(Input.GetMouseButtonDown(0)) { var effectInstance = Instantiate(SomeEffect, Camera.main.transform.position, new Quaternion()) as GameObject; var effectSettings = effectInstance.GetComponent<EffectSettings>(); effectSettings.UseMoveVector = true; effectSettings.MoveVector = Camera.main.transform.forward + Camera.main.transform.position; //or you can use effectSettings.MoveVector = Camera.main.transform.forward + Camera.main.transform.position } Do I need to do anything special to assign the rotation of my camera? That is the only thing I think I am missing here, but I have had someone look at the code and verify that in their opinion everything should be working fine.
I don't know what library you use for particle effect and how does it work but it seems very suspicious that your MoveVector value is sum of position and direction vectors. Try Code (csharp): MoveVector = Camera.main.transform.forward or Code (csharp): var effectInstance =Instantiate(SomeEffect, Camera.main.transform.position, Camera.main.transform.rotation) as GameObject;