You can write your topic however you want, but you need to answer these questions:
-
I want the tracer to look for the same dimension from all the distances and hopefully FOVs (may look bigger in lower FOVs idc really). I like the dimension it has when i shoot the trees with the scope for example.
-
I need the Beam to look the same depending on the Camera distance to the hit position so it doesnt look too big if it landed near you or far from you.
-
I looked on the devforum and found a couple threads talking about making the tracers like phantom forces, but its a way too complicated system. What i want is CSGO alike tracers that look the same size from all distances.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
This is the client-sided block of code that is responsible of creating these tracers.
tracerEvent.OnClientEvent:Connect(function(origin,result:Vector3,mousehit)
local tracer = game.ReplicatedStorage:WaitForChild("Tracer"):Clone()
tracer.Position = origin.WorldPosition
if result then
tracer.HitPos.WorldPosition = result
else
tracer.HitPos.WorldPosition = mousehit.Position
end
tracer.HitOrigin.WorldPosition = origin.WorldPosition
local distance = (Camera.CFrame.Position - tracer.HitPos.WorldPosition).Magnitude
tracer.Beam.Width1 = distance/500+0.2 --attempt to compensate for the distance
tracer.Parent = workspace.Debris
wait(0.01)
tracer:Destroy()
end)
Video demonstrating the function of said tracers: Desktop 2023.06.04 - 17.18.54.01
What i want to achieve (make them like these but maybe bigger so theyre more visible): Anyone remember the old Negev? - YouTube