I am wondering if there is a way to make footprints, such as prints left behind when a person walks in the snow?
- It would need to work on terrain, not just flat surfaces.
- The prints would slowly fade away after a while.
I am wondering if there is a way to make footprints, such as prints left behind when a person walks in the snow?
Decals,meshes,or trails activated on touch. Could be more possibilities though nothing comes to mind.
To actually indent it into the terrain itself however I believe is impossible unless the terrain was made out of parts.
You could try making them physics based like having them fall into place based on the players foot angle. But it would be quite impractical. Just a thought.
Maybe you could leave some impression in the terrain by adding small chunks of terrain (which would blend with other materials) and then wait your time, and then place another identical block of terrain to override the previous chunk.
You could use something like Terrain:FillBlock()
If you mean footprints with depth, I have tried experimenting with it lately.
https://twitter.com/JoeBpng/status/1087113218106056707
I used SurfaceGuis and AlwaysOnTop, but it only worked if nothing was in front of the prints. I am sure there is a way to do it, but it will require math.
If you’ve ever played the game “Shred” on Roblox, you’ll see that it has “snowboard prints”. It uses trails. I think the best way to handle footprints is to do something like that.
What you’d want to do is check if Humanoid.FloorMaterial == Enum.Material.Snow every frame (or on some property changed). That way you can disable the trail when they are not on top of snow, like if they are in the air.
You can of course use Humanoid.FloorMaterial to determine whether or not the humanoid is walking on Snow. After this, you can attach a Humanoid.Running event for whenever the player is walking, which will signal you to start making footprints every X amount of seconds.
If you want to get more technical, you can fire a ray from the foot of your humanoid for whenever it steps on the ground. After, use the Normal returned from :FindPartOnRay, and use this to rotate the footprint accordingly.
You can utilize the new Revamped Animation Events to do this quite easily.
Import a walk/run animation into the animation editor
create an event for each time the foot hits the ground, give it the parameter “Left” or “Right” corresponding to which side foot.
in Lua, connect to that animation event, and cframe a part w/ a footprint decal at the closest surface to the appropriate foot.