I want the character to be able to line trace into a mesh, and if the mesh is in the mesh array, the character’s static mesh will be changed into whatever they looked at. I have an idea of what to do but am running into problems beyond my knowledge. The “MeshArray” variable has two static meshes in it right now: the starter content chair and table. E is the input action. I just put both to see if it would work.
EDIT: I am in the first person shooter template. Also, my line trace seems to only go one direction.
Prop hunt much? all you need to do is to get the mesh of the hit actor and do foreach (with break will be nice) search in the array, and if its true save its index and then change your mesh with the index.
It depends, I guess your props are a pawn so casting it to a pawn should be alright(but if so make sure that you make them as a pawn and not character or an actor, character have too many unnecessary components and actor, you most cast it to the actor you create and do children from that actor for each of your props(best for advance games but I don’t think you need it), so make sure that they created as a pawn).