x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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

alt text

alt text

Product Version: UE 4.17
Tags:
ue4projectile.jpg (383.1 kB)
ue4projectile1.jpg (678.1 kB)
more ▼

asked Aug 24 '17 at 10:01 PM in Blueprint Scripting

avatar image

GuilhermeAU
1 1 2 1

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

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.

more ▼

answered Aug 25 '17 at 06:30 PM

avatar image

cmarston74
296 6 7 10

avatar image GuilhermeAU Aug 26 '17 at 06:57 AM

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

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question