Projectile Shooting "Wrong" Direction How Fix
I recently followed this tutorial for make my enemy AI for move and attack/shoot my player https://www.youtube.com/watch?v=h0Kb42oCoYg
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
asked Aug 24 '17 at 10:01 PM in Blueprint Scripting
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.
answered Aug 25 '17 at 06:30 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here