How to make an object spawn another object

i’m making a game where you’re a slime and when you eat stuff another slime spawns or something i don’t really know what I’m making. What i want is that when you touch the food with the character a piece of slime goes on it and consumes it and turns into a slime. I’ve kinda figured out that part except that i don’t know how to make the slime spawn on the food.

4 Likes

spawn behavior, in components

2 Likes

Use collision so when you touch the food you spawn a slime, you can have a small proximity so you can get the X and Y values to spawn it there. If you need I can make an example of this.

1 Like

Simpler solution: Emit

3 Likes

emit is not as exact as spawn, but I guess if he wanted it to spawn from the slime then go towards the food emit should work good.

1 Like

Yeah, I agree.

1 Like