How would you visualize actor placement before placing it in game?

How would a player be able to visualise where an object would spawn before actually spawning it. Would the best way be to spawn the object with a semi-transparent material then when it is placed to change the material to the final one?

Thanks

Hm i did this by spawning the actor and updating his location to the point i’m looking at. When i really press “drop” or something, i deleted the model and placed the real one. You can also just stop moving him and change the Material to the normal one.

- YouTube Here, that is how i done it half a month ago. Ignore the fact that he instantly wants to drop the item. At this point i had no real way to scroll though my inventory and just droped the one at index 0.
But i guess that’s the way you want it (only with the changing material, but thats not the problem to change or?)

Thanks for the reply eXi

I thought as much. Thank you for the video link because I think you may be able to help with another one of my questions. How can you spawn an object on terrain ground level? - World Creation - Unreal Engine Forums

I notice in the video that the chairs stay at a certain height above the ground (or on the ground). Did you lock the actor to a certain height?

No, i just use a line trace to check the ground. If i hit the ground, i just use the hitlocation for the spawn. The little gap between the model and the ground comes from its pivot i guess. If i would have the model in its components a bit down it would fit perfectly i guess.

EDIT: You need to adjust the rotation as well. In my video i only rotated the chair towards the player (Vector math). If you have hills and want to spawn the model a bit rotated cause of the underground, you need to calcutate the rotation of the model by using the hitnormal of the ground i guess.

EDIT2:

Here is an ugly picture of what i mean. My example only spawn the object the top way. Aligned to the horizontal.
If you want to rotate it like the second way, you need the green hitnormals. You can get them from the hitresult of your linetrace (red line)

http://puu.sh/aPa5d/3c66e7898d.png

Thanks for the detailed reply and pic. Everytime i break a hit result and see hit normals i have wondered what it is. Now i know so thank you. But my last question is what do i do with the hit normals to produce the result at the bottom of the pic? how do i get the chair to rotate to the normals?

EDIT: Disregard my last question i figured it out. You use the Rotation from XVector node.

Thanks for all of your help eXi

Im not that good in calculating this. But you would just use the “ImpactNormal” pin and drag it out. Use “Make Rot from Z” and plug that into your Rotation of the Transform for the spawn.
I can’t get together how to change the rotation for the hitnormals AND for facing the character. Maybe something with the roll pitch and yaw of a rotation. Maybe someone else could help you there, or you try yourself in math :smiley:

http://puu.sh/aPbCX/901bb03f31.jpg

The left side of the Line Trace is just a calculation for the start and endpoint. I get my player position, add the camera height to the z axis and for the end i add the vector the camera has at the moment multiplied by 500 to the start vector.

To see the picture in fullscreen click here:

http://puu.sh/aPbCX/901bb03f31.jpg

EDIT: AH! Here, use this:

http://puu.sh/aPbSb/a3711472b5.png

Get the Actor location again. Subtract the Hitlocation to get the object to face you (or subtract the actor location from the hitlocation to let a face away from you) and than use the node “Make Rot from ZX”. For Z you use the ImpactHitnormal again. For X you use the Result of the subtraction. (: Hope that helps.

New Picture Link: http://puu.sh/aPbSb/a3711472b5.png

Perfect. I spent 3 hours just trying to make it face you and rotate to the hit normal correctly but no luck. I tried your last method and it works like a charm! Thanks so much eXi!

eXi that solution works if you’re placing things on the ground. I’m trying to do placement both on walls and on the ground, and on walls he moves all around the X axis instead of being fixed, any suggestions?