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"

Having Enemy Shoot Projectile at Player 3D

Basically in my game the player as well as the monsters shoot physical projectiles and the point is to dodge the monster shots and kill the enemy. If I spawn the enemy projectile from inside the enemy, and then add impulse, how would I enter the vector into the node so that the bullet goes towards the player?

Product Version: UE 4.15
Tags:
more ▼

asked Apr 29 '17 at 12:54 AM in Blueprint Scripting

avatar image

Kaji Ikaraseru
3 1 2 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

If in the projectile you used the Projectile Movementalt text

You will see an option called Is Homing Project at Homing in the Details, you activate italt text

This option is the projectile target he is going to go to that target, to Set it you can do a Simple Code:

alt text

screenshot_2.png (2.6 kB)
screenshot_3.png (4.1 kB)
screenshot_4.png (25.4 kB)
screenshot_4.png (28.4 kB)
more ▼

answered Apr 29 '17 at 01:27 AM

avatar image

PedroAK
39 4 4 9

avatar image Kaji Ikaraseru Apr 29 '17 at 02:03 AM

Hmm well I might do that for projectile movement instead of adding impulse. Problem is though that I do not want the projectile to home in on the player. A better way to explain I guess is I want the monster to shoot in a direction, based off of the position of the player, so that it shoots at the player position, and keeps going that direction, or have like a pattern of shots based on where the player is standing relative to the monster. Hope that made sense.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Ok. So try doing this but just set home when trying the enemies shoot and do it just once. So the projectile sets the home and go only tgere. Try that.

Observation: never tried but I think it would work

more ▼

answered Apr 29 '17 at 05:30 AM

avatar image

PedroAK
39 4 4 9

avatar image PedroAK Apr 29 '17 at 05:32 AM

Sorry for the misspelling what I meant to say was that you can try setting the home target just once. When the enemies shoot. So that this way the projectile sets the home once and go only for that direction.

avatar image Kaji Ikaraseru Apr 29 '17 at 09:40 PM

I'll give it a try

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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