#ok so im making a bullet that goes to mouse.hit but sometimes if the gun goes inside a wall then the
1 messages · Page 1 of 1 (latest)
ok so i have a gun and it fires a bullet. the bullet starts out in front of the guns barrel and goes to mouse.hit
but the barrel is inside a wall, causing the mouse.hit to be behind the barrel
the mouse.hit hits the wall, while the barrel is inside the wall and further than mouse.hit
@shell shuttle and i tried dotting the thing but it didnt work
I mean could use shitty method like .touched to destroy
Also not sure if I understand
U should prob not use mouse.hit
Rather camera viewport to ray
And u get direction from that
camera lookvector?
Idrk I used it once from yt tutorial
Just find out how to use viewport to ray
Maybe I don't understand what exactly u need tho
It's 1am for me
Nah nah
Just
Try viewport to ray or just use touched
If that solves then good
If no or I misunderstood then cooked
"SCRIPT TO RUN"