Projectile Shooting "Wrong" Direction How Fix

I recently followed this tutorial for make my enemy AI for move and attack/shoot my player


skip to 17:30 or 19:00 where is the attack bp

after finish the AI and test, i could see the enemy isn’t shooting from actor forward, but is shooting from world forward
i tried fix but i achieved same result
If anyone knows how to fix this problem, I would be very grateful

Your blueprint is providing a location but not a direction. It will default to the world x axis unless you specify a rotator to the spawn transform.

The simplest way to handle this is br3ak your link to the spawn transform input. Right click the spawn transform pin and select seperate pin struct. This will allow you to connect a location and a rotation without having to make a full transform.

Once you have that, you can GetActorForwardVector attach the vector to a MakeRotatorFromXVector and plug the input into the rotator pin on SpawnActorFrpmClass node. This will provide a rotator aligned to the actors forward vector.

I Figured out what as happend, the question still here because im noob and i dont know how to delete the answer

Hi I have the same problem can you share the solution you find that would be much appreciated!

Hi, can you show your blueprint?

I got it solved it was a physics problem. In 2D space my ball was shooting only in X direction I don’t remember the actual resolution of the problem but it seems the impulse was not in the right direction that’s all. Thank you for responding tho.