Download

How can I make a furnace that heats up food?

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.

Example: I thinking of something like the forge in My Little Blacksmith Shop (https://youtu.be/0B1mL20g3MU?t=170)

Thanks in advance.

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.

On the most fundamental level, the furnace would have a box collision that detects foodstuff thrown at it, at which point we run a timer (5s here):

Once the timer is up, we change the texture.

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).

Your idea worked perfectly, and I think its the one Im gonna use throughout my game, thank you

Thanks for your help too