- Home /
UI mask with a 3D object
I have seen some questions about this already but none of them seem to work. Can I make a UI mask so it will only show the right part of the car? Or should I use something else?
Answer by Vivien_Lynn · Aug 21, 2021 at 04:19 PM
You could spawn your car off-screen and with a second camera record the car. Cast the game view of your second camera to a RenderTexture and use this RenderTexture in your UI, instead of the 3D model.
If you want to push it even further, you can then use your RenderTexture to create a Texture2D. This allows you to destroy the second camera and the car, and you can still use your newly created Texture.
I don't know how much you know about RenderTextures . So here is a tutorial which I used a few years ago, when I had to learn about them and how to use them: https://www.youtube.com/watch?v=28JTTXqMvOU
Your answer
Follow this Question
Related Questions
Mask 3D objects inside UI ScrollRect 4 Answers
Dropdown inside mask 1 Answer
Using UI Text as as mask for an underlying image 2 Answers
TextMeshPro InputField masking not working 0 Answers
Can I combine 2 or more UI masks? 0 Answers