Basically what i’m trying to do is:
I have a bullet (raycast).
When you move or jump the bullet stays in its original position until it’s been deleted.
I’m trying to make it so the starting point of the bullet stays attached to the barrel of the gun while the other side stays where it was shot.
Original side - >---------------------------| ← where bullet stopped (the position of this side should not change)
The original side’s position however, should change, depending on the position of the barrel?
How could I do this?
joebersons
(joeberson)
September 23, 2020, 2:07am
#2
Most of the time guns don’t use this “beam” effect to show where you are shooting. Your bullet is actually going in the correct direction, but the beam, since its not long enough, is giving the illusion that it’s not.
A lot of games use a traveling projectile to represent a bullet, rather than using a beam straight from the barrel to the destination.
In the gif of your reply above, the beam lags behind when you move. This is a big reason why this method of bullet tracing makes no sense.
If you really want to know how to do this, you will need to constantly update the parts CFrame using Renderstep until the effect is gone. I would probably use BindToRenderStep() for this, so you can hook into Renderstep only when you need to, and then unbind.
Thank you so much, was a lot easier than I would have expected!
Ended up with this, nearly flawless on the client side.
https://streamable.com/ddaa3f