Change Mesh & Material in VR

Hi everyone,

I’m currently working on a VR camp fire scene and I’m facing some problems roasting marshmallows. Hopefully someone can help me (:

Problem 1: I’ve got 3 meshes: Stick, Marshmallow, StickWithMarshmallow and 2 Materials: StickWithMarshmallow_Mat and StickWithMarshmallowBurnt_Mat
On the tip of the stick is a collision box. When you put a marshmallow on top of the stick, the mesh should change to StickWithMarshmallow and the marshmallow should get destroyed.
=> You take a marshmallow, put it on the stick and the mesh changes

Problem 2: The material of the StickWithMarshmallow should change from StickWithMarshmallow_Mat to StickWithMarshmallowBurnt_Mat after it rests about 10 seconds in the fire collision box.

Afterwards it would be nice if you could pull of the roasted marshmallow again and eat it (play swallow-sound when the controller is near the occolus and destroy the marshmallow). But that is sugar and not necessary :wink:

I’m all new to this and I’d really be thankful if someone could help me.
Thanks in advance and I’m looking forward for answers (:

Here is how I would set it up (every word in quotation marks is google-able):

I would make 2 Pickup objects, a stick and marshmallow. For each a material. The stick material can probably just be static/ doesn’t need to change. The marshmallow can change. You can go for 2 textures , 1 marshmallow and 1 burnt marshmallow (if you are more advanced you can try only 1 texture and a mask). You can use a “Lerp Node” for that in the Material Editor and a “Scalar Parameter” that controls the alpha of that Lerp. Make a “Material Instance Dynamic” (MID) in your marshmallow, so you can change the Scalar Parameter. Both objects are Pickups, so they already have a collision. You can “attach” the marshmallow on the stick and “detach” it when the hand collider is near. When the marshmallow is near the fire (which is it’s own Blueprint with a collider), call the “Damage Event” in your marshmallow that is already in Unreal. In your marshmallow when “EventOnDamage” is called, change your Scalar Parameter.

If you have other issues, just report back! <3