change actor when killing the enemy (resolved)

Typically, what people do, is animate the crushing, and use the same mesh, just with an animation (blend animation or skeletal animation) that makes it squished.

However, if you have two different meshes, you can do one of two things:

  1. Inside the destroyed goomba, set some flag so it knows it’s destroyed, and then change the “Mesh” property to reference the second mesh.
  2. Call Destroy on the goomba, and Unpossess it from the AIController, then Spawn Actor on the new class, and Possess it with the AIController.

I highly recommend using the animation if you can, and if not, swapping the mesh, not the entire pawn/controller setup.

3 Likes