Attempting to dynamically pass attributes into a spawned projectile. I am using SpawnActorDeferred(); Everything about it works in terms of the stats updating on the spawned actor, the problem is the rotation.
If I am facing forward, it shoots forward. If I turn 45 degrees, it shoots 45 degrees from me. If I turn 90, I am shooting sideways. And so on.
Currently passed in transform is the USceneComponent it spawns from->GetComponentTransform(); — is this what I should be passing?
Addition weirdness: Passing GetComponentTransform() results in the correct starting location of the projectile, but the above wrong rotation behaviour. If I instead pass GetRelativeTransform(), the projectile spawns at world origin (wrong location), but has the exactly correct rotational information.
Where are you suggesting I put that in? ForwardVector of Actor is passed to Velocity, but I can change that to literally anything and it seems to affect nothing.
If I try to add SetActorLocation/Rotation/Forward()'s inside the Spawn section, nothing happens (as I am assuming the first and final Transform passes override them anyway).
I have also tried changing FTransform SpawnTransform = BasicSpawnLocation->GetComponentTransform(); to just GetActorTransform() which changes spawn location from the component to the middle of the actor, but the rotation problem persists.