Hey all. I’m wanting to make a basic multiplayer prophunt-like game in UE4.10. Basically, I need the player to be able to left-click certain actors and change their player model into the actor they clicked, but only for certain actors (so that they don’t change into walls, ceilings, etc.) For example, if they were in a room with a sphere, cone, and cube, clicking either of those three would turn them into whichever one they clicked. If they were to click on a wall, floor, or ceiling, nothing would happen. How can I achieve this ? Is there anything specific I would have to do to make this work with multiplayer? Sorry if this is very obvious/silly, I’m very new to UE4. Any help would be greatly appreciated. Thanks!
I suppose the easiest way to do it is to have the shapes be an actor who’s mesh you can set in the world, and when you’re playing, do a line trace out and if you hit something, cast it to the actor you made. If it is the actor, then get the mesh and set the player’s mesh to it.
Ah, I managed to get it somewhat working. Here’s what I have right now:
It seems to work pretty well, except for the fact that I need to completely get rid of the first character they were as soon as they change. Basically, when they change from human to cube, the human pawn is completely removed. However, I only want this to happen the first time they transform (from human to whatever pawn they click on). Any other time that they transform, from one pawn to another, the previous one will not be removed. Any clue how I can do this?