I use raycasts for a blood system, and the bloods Y size is 0.001. The problem is that it goes 0.001 (Axis.Y/2 (Impossible in this case) ) Studs in the ground, inside of my raycasting system, how can I make the raycast go 0.001 studs “up” but still depending on the direction?
I know I could use Position+vector3.new(0,0.001,0), but that would result in it only working in the Y level. The reason I want this fixed is because blood clips through the ground since the PBR Mesh for the blood is at a very slight angle.
Just make the blood Part .004 studs thick. That way it should be .002 studs above the surface.
The other alternative is to use the Part’s CFrame, not the World CFrame.
local raycast = workspace:Raycast(parthere,direction,params)
local castCF = CFrame.new(raycast.Position,raycast.Position + raycast.Normal)
part.CFrame = castCF + CFrame.new(0,0,0) --edit this to get the specific direction
And Roblox CFraming will actually calculate to finer decimals than .001. It only shows .001 in Studio.
You can see this if you zoom in right to a Parts edge and type in an x, y or z values like (for example) 42.005 then try 42.0045, then try 42.0054. The value will read 42.005, but you can see the Part edge move very slightly.
Try increasing the thickness by about .002 studs each time to see if it still splits.
Decals drawn right at the surface of other Parts will start to get covered up as you move the camera further away.
Even if you increase it so the splatter sits .01 studs above the surface I doubt anyone will even notice it during gameplay.
I need way to make raycast part go on the position and not in the position because the mesh will always be inside no matter how high it thick because is shaped like this: