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"

Player Look only works on certain actors

Hey y'all, I'm having a time figuring out how to make my player (First Person) look at objects properly. I'm simply trying to have the player start oriented toward a specific actor in my level, but it mysteriously only works for a very specific set of actors. They are actor blueprints called "GoalA" and "GoalB".

If I use one of these goals as the look at target, it works perfectly, but if I use one of my characters as the target (my intended look at target for what I'm trying to do), then it doesn't work; instead it looks down toward the world origin. This happens no matter what I create and add to my level. It can't look at anything, not a TargetPoint, not other blueprints, not an Empty Actor, nothing. Only works on these Goal blueprints for some reason: alt text

the only thing I see different between these blueprints and other blueprints is that they have Instance Editable set to true. Could that be something? alt text

Any other tips on look at targets? What can and can't be used and why?

In case it helps, here's the details of the 'PlayerLook' Macro seen in my bp: alt text

Thanks for any tips in this matter. I'm totally stumped!

Product Version: UE 4.18
Tags:
more ▼

asked Jan 15 '18 at 07:30 AM in Blueprint Scripting

avatar image

RaNewt
26 4 3 7

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

2 answers: sort voted first

Thanks for the help, saeedc!

I get what you're saying. Hadn't thought of that as an option.

I think I found the answer. I was scripting things inside of a character blueprint, which was only giving me access to certain actors to use as look at targets.

Once I moved my script out to the level blueprint, everything worked as expected.

I don't fully understand why it fixed things, though. Since the Goal actor blueprints were targetable for some unknown reason while the rest wasn't. I can't think of anything that is special about them.

more ▼

answered Jan 16 '18 at 02:35 AM

avatar image

RaNewt
26 4 3 7

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

HI.

from variable panel select your goal var. then from details change "variable type" to "Actor" then it can be any actor

more ▼

answered Jan 15 '18 at 08:31 AM

avatar image

saeedc
2.3k 72 40 105

avatar image RaNewt Jan 15 '18 at 07:57 PM

I don't understand how changing the Goal variable has anything to do with whether I can look at other actors in the level. i.e. I can't even create a new box actor in my level and have the player look at that. This tells me the issue is more general/global than the Goal variables.

Unless I'm misunderstanding your answer, I don't think it's gonna make any difference anyways.

I gotta be missing something obvious.

(The reason I have Goal set to a variable that only references itself (and not other actors) is that I need a reference to this specific actor for scripting. I can't change it to be anything or things will break.)

avatar image saeedc Jan 16 '18 at 02:30 AM

You have to change variable type to be of an actor. Then you can cast that actor to your goal actor to access its properties for scripting.

Just drag a wire from that actor var and type "cast to goal",

(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