How does this game make this cleaning system possible?

Hello DevForum, i have a question.

How does this game make the cleaning system seen in the video?

What methods do they use to make the material fade when you’re scrubbing the car with the sponge?

Any ideas will work, please let me know!

1 Like

Have you looked into EditableImage?

yes but I don’t really know how to apply that to this system

Without having made a system like this myself, I can make an educated guess that it’s the following setup:

  1. The car body is a MeshPart
  2. The MeshPart has its TextureContent property set to a Content instance that itself refers to an EditableImage.
  3. While holding down the left mouse button, the screen-space position of the cursor (a Vector2 value) is projected into world space as a Vector3, and then projected back into a position on the texture that’s applied to the mesh itself.
    • I don’t know what method is used here specifically, but with some research around this area you should be able to figure it out?
  4. With the resulting Vector2 of step 3, any of the Draw... methods on EditableImage can be used to paint pixels onto the image, and thus, the car.
1 Like

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