Forum rules - please read before posting.

Changing Mesh mid game

Hi, 

I have a mesh that contains the character to a particular part of the scene, and then a far larger mesh for the character to go into at a later stage.

How do I swap meshes once clicking on a hotspot?

Thanks!

Comments

  • Create a separate Player prefab that uses the new mesh.  In your Settings Manager, set Player switching to Allow, and drop in both of your Player prefabs.  You can then use the Player: Switch Action to change your Player prefab in-game.
  • Thanks but how do I tell a prefab to use a particular mesh?
  • You have to make a new prefab from the mesh.  Drag the mesh into the scene, and you can use the new Character Wizard (in the top toolbar) to convert it into a new Player, which you can then make a prefab.
  • Ok so I now have a new player that is the mesh that I want the new changed player to use and the other to not, what do I do next?
  • Have you followed the steps I gave in my first reply?
  • yes. I made a new prefab of the mesh, the mesh was already in the scene (i had two meshes in there) so i made a prefab of it, and dragged it into the character wizard and converted it into a new player, so i have a mesh that is a player... and then i made that a prefab, but i don't really understand why?

    my original player is in a small NavMesh to ensure that he does not stroll out of it. When the default player changes into the new player in wetsuit costume he is stuck in the original mesh, and I need him to be able to go into a new mesh whilst making the original mesh disappear. One mesh is in a submarine and the other is outside the submarine in water.

    I hope that makes sense
  • They need to be separate prefabs so that AC can swap them in and out whenever you want them to.

    So now the only problem is that you want to change the active NavMesh, correct?  Once you've created a separate NavMesh that covers the new area, you can use the Engine: Change scene settings Action to make the 2nd NavMesh the active one.
  • Thanks, got this working now!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.