How can you spawn a mesh preview

Hi ,

I am building a game where a player can build buildings. as the building should be previewed in game as the player you want to see where it is going to be build it would need a preview. but I have no idea where to start.

I am able to spawn it where I want but it is allways a permanent spawn. You should think of this as the Command and conquer when you build your buildings the preview follows the mouse till you click.

I have some idea like:

key press → gate → trace channel → spawn at hit → spawn a 50% transparent mesh. → but then it won`t follow the mouse as it is fixed in the location.

key release → destroy preview mesh → spawn permanent mesh @ current location.

So how would I keep the temporary transparent preview mesh to the trace location and keep it only 1 mesh ? So looks like I need to lock the mesh to the continues trace or something ??