Opinons, Line Render Or Collision

Greetings,
I am making an fps game, and I wanted to get opinions and a couple explanations. I am currently working on the shooting mechanics and I have the option to use prefabs and use collisions to detect objects, but I was thinking this might use too much computing power or might not be efficient, option two is that I should use a line render, however with the line render, it lags in its position relative to the gun and if i wanted minimal lag I would have to keep the Line Render on the entire game. So I would like to know what you think? Please state a reason

Thanks.

I didnt relly understand the goal youre trying to reach, but if youre trying to shoot something and detect, what you shot:
I orefer using raycasts, because its fairly efficient, and user friendly, because they dont have to deal with gravity
If this wasnt what you meant, then my answee could be incorrect

1 Like

Well I was trying to use the line render but when I was moving my character around and it’s rotation the line render couldn’t keep up.

I still cant understand, what youre trying to reach with either of those, but maybe Im sliw at 2 pm, could you explain it, what youre planning to do? Shootijg a gun, moving a player, checking if the player is on ground?

shooting a gun sorry I wasn’t clear enough

A line renderer is not going to help with a gun. A line renderer simply draws a line. Appropriate for rendering a lazer beam, but not much else.

You want to use a Physics.Raycast instead.

Okay Thanks

And if you only do, when the trigger is pulled, aka the player pressed something, then it wont use up too many resources