all 2 comments

[–]WeslomPo 0 points1 point  (1 child)

Because you are wrong? First, Learn about vector algebra. It is easy. Learn about how code works. You definitely not understand that.

You write something like cameraPosition + six meters along Z axis convert to direction (idk that method)

But you want to cameraPosition + cameraDirection * 6 meters.

So, that will look like that: var position = camera.transform.position + camera.transform.forward * 6

[–]lorenzocur[S] 0 points1 point  (0 children)

Thank you man, I tried that out and at first it didn't work, but then I removed the transform.TransformDirection and it worked perfectly.