If i do a line trace and i hit an object, is there a way to find out in which direction the hit polygon is facing and align an object to it? I have build some kind of interior editor and specially with wall objects it would be nice if i could align them directly to the wall.
Kind of old but I stumbled on it while making my Portal-Gun. I fire a projectile which creates a portal Sprite “onHit” and I want that portal to have a rotation that is exactly like the walls polygon the projectile hit. (Long story short: just like in the game “Portal”)
The “rotationFromXVector” Node really solves that. Here is an example of my BP which delivers a Transform with location of the projectile (Can easily be replayed with “hit location”) and the rotation of the “polygon” (mesh) that was hit.
Projectile that spawns a portal on hit (only at worldStatic and worldDynamic):