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"

How do I make an actor look at a character?

I created a tower, that's an actor class, and for testing purposes to see if it worked I have it look at me if I'm in it's radius and shoot towards me. But now I'm trying to make it so that when another character, such as a bot, is in it's radius the tower looks at the bot and shoots at it instead.

I've tried changing the GetActorLocation target to get a reference to my bot, get movement base actor, get owner and a couple more ways and I still can't get my tower to look at my bot. When they pass within it's radius the tower doesn't look at or shoot. Does anyone have a suggestion on how I can get this working?

I attached a screenshot of my look at player function in my tower blueprint.


alt text

Product Version: UE 4.9
lookat.png (98.3 kB)
more ▼

asked Feb 10 '16 at 05:43 PM in Blueprint Scripting

avatar image

10 2 5 7

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

1 answer: sort voted first

I think a simple way around this is to have it check for the "bot" presence first using a branch then if "bot" returns false it goes to another branch and checks for player.

more ▼

answered Feb 10 '16 at 07:23 PM

avatar image

94 8 7 12

avatar image Ludwig44 Feb 11 '16 at 07:25 PM

But I don't want it to check for the player since it won't be looking at or shooting the player, it's only going to be attacking the bots walking within it's radius. I only had it originally checking for the player to test if it could shoot a moving target.

(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