# Spawning object and align rotation based on pivot point

**URL:** <https://forums.unrealengine.com/t/spawning-object-and-align-rotation-based-on-pivot-point/569477>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE5-0, Blueprint, question\
**Created:** [May 29, 2022, 10:34pm UTC](https://forums.unrealengine.com/t/spawning-object-and-align-rotation-based-on-pivot-point/569477 "2022-05-29T22:34:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TimAdamcik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TimAdamcik](https://forums.unrealengine.com/u/TimAdamcik)\
**Post date:** [May 29, 2022, 10:34pm UTC](https://forums.unrealengine.com/t/spawning-object-and-align-rotation-based-on-pivot-point/569477/1 "2022-05-29T22:34:45Z")

</div>

Hi I cant really get this to work where if I try to use spawn actor from class, and use linetrace ends, it doesnt work. What im trying to do is to get player to raycast into the scene, and based on the impact point to spawn the object based on the normal of the raycasted surface

---

<div class="post-metadata">

**Author:** ![pezzott1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pezzott1/32/1215068_2.png) [@pezzott1](https://forums.unrealengine.com/u/pezzott1)\
**Post date:** [May 29, 2022, 11:01pm UTC](https://forums.unrealengine.com/t/spawning-object-and-align-rotation-based-on-pivot-point/569477/2 "2022-05-29T23:01:40Z")

</div>

Like this:

 ![BP_TraceToSpawnOnSurface-EventGraph](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/9/d/89d2dd55eff909d5c31332f3af0fae2ae89c63f3.jpeg)

* * *

![SpawnOnSurface](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/4/1/e41c8b9b14b0828b5112796b26e9a0822f6ecafa.gif)
