Footprint Decals Overlapping

Hey guys im trying to make a footprint decal system.

It works well but the only issue is that sometimes if you get to the edge of the snow the decal may overlap onto the concrete instead of the snow.

I’m currently using raycasting to place the footprints but does anyone know how i can stop the footprints overlapping the concrete?

Thanks.

local Result = workspace:Raycast(foot.Position, Vector3.new(0,-2,0))
			
			if Result then
				local LookVector = Result.Normal:Cross(humanoid.Parent:WaitForChild("HumanoidRootPart").CFrame.RightVector)
				footprint = footprint[side]:Clone()
				
				footprint.CFrame = CFrame.lookAt(Result.Position, Result.Position+LookVector, Result.Normal) * CFrame.Angles(0,-110,0)
				footprint.Parent = workspace

1 Like

I guess you could just check if there is concrete within X studs of the footprint location, by looping through parts identified by :GetPartsBoundInRadius(). This solution will result in the footprints just not displaying if it is too close though. See my below alternative if you want it to show partial footsteps.


If you add a thin glass barrier, which can have a transparency of 0.99, just above the concrete which borders the snow, then you can effectively hide the decal that overlaps onto the concrete.

2 Likes

Thank you very much for your help

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.