Hello everyone,
I want to give user the ability to place meshes on a map, but i have no idea where to start.
Could you please give any recommendations?
Thanks in advance.
UPD:
I want to make some kind of UI where the player can choose the mesh by pressing buttons on keyboard and then also using keyboard arrows choose a location
What you need to understand that there is nothing like mouse location or position in a game world . Your mouse location on screen translates to a ray in the game’s world , so you first have to decide at which point of the ray you want to spawn the new object.
What you’re doing now is spawning the object at Location which is where the ray starts i.e. spawning on your player’s location.What you really want to do is to spawn in the place where the “mouse ray” intersects another actor . Ray cast as given in above and spawn at the desired location . Make an array of static meshes
Thank you very much for your answer.
But i still cannot understand I want to make some kind of UI where the player can choose the mesh by pressing buttons on keyboard and then also using keyboard arrows choose a location. Is it possible to do?