Hello,
I want to make the bullet go from BulletEmitter which is already done but I want it to go IN THE DIRECTION MY PLAYER IS FACING. And this part is important I don’t want to make it go forward forever:
transform.Translate(Vector3.forward * moveSpeed * Time.deltaTime); //WRONG CODE, IT GOES ALWAYS FORWARD ALONG THE Z AXIS.
I tried literally everything. With Rigidbody the bullets are weirdly rotating though I instantiate them with Quaternion.Identity. Also I tried launching the bullet this way:
transform.Translate(BulletEmitter.forward * moveSpeed * Time.deltaTime); //Same effect as the previous code.
I have no idea what to do. Please help me. I tried using MoveTowards() and move it towards my crosshair but still does not work:
Vector3.MoveTowards(transform.position, Crosshair.transform.position, maxDistance * moveSpeed * Time.deltaTime); //The bullet just stands still in the air...
If it’s possible I would rather use Vector3 or transform to move the bullet instead of Rigidbody but Rigidbody is easier or better then okay.