Hi there everyone. Im developing a 3D cooking game with physics and Im having some trouble figuring out how would I make a furnace that I could drop my food actor inside and it would change the texture to a cooked one. So far I have a furnace with a trigger and a cube actor that detects when it enters the trigger.
Hi man,
What you want to do is create a dynamic material instance for your food https://www.youtube.com/watch?v=P-J7ecGF1zk
You can create a material with 2 texture and a variable to guide the material to show A, or B.
when you make the food you create for him the instanced material, and then when you cook it ,
using your collisions, or anything else, you change the variable from 0, to 1.
It can be a slow fading process, 0,1. 0,2 . 0,3 . 0,4… or a direfct change.
In practice, you’ll need to account for more things, like food being taken away before it finished cooking. Or food requiring different cooking times. Or another food item landing in the oven.
edit: and ofc, **Est_engine **is right here - ideally you’d use a dynamic material instance that *modifies *the look of the food as it’s being cooked rather than assign it a new look after (optional but preferable in most cases).