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 to set First Person actor (First person Camera)Location to a specified Target Point in a Actor blueprint?

Hello guys,I'm new to UE4 and Blueprint. Now, I have a problem. I want to set my actor location to a target point in a actor blueprint,not in a level blueprint. I use a button on a widget to execute custom event to make the above progress come true. Now, my widget works fine, but I can't teleport my first person actor to the a specified target point. How should I do? Thank you. PS:I'm sorry for my poor English.Wish you could understand my meaning. alt text

Product Version: UE 4.12
1.png (275.6 kB)
more ▼

asked Jul 13 '16 at 07:10 AM in Blueprint Scripting

avatar image

1 3 6 6

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

1 answer: sort voted first

This looks correct, so i assume the question lies more in how to get the location. Depending on your game there is multiple ways to implement this. One might be better than the other in this case.

However with not knowing much else what i would do is:

In your playercontroller create a new custom event and name it. Call this in your widget, when the button is clicked. You can do that with a ‘get owning player‘ which you then cast to your custom playerController. On cast, you can now call your custom event.

In your custom event put all the logic you want to have (setactorlocatopn). To get a variable location create a new varr of vector3 in your player controller and get its value into the setactorlocation. When you want to change your location (maybe in levelblueprint?) You do a cast again similar to your widget. GetPlayerController, castToMyPlayerController, set vector3 variable.

Please note, that depending on your game, there is other ways to implement this.

Mostly talkin about multiplayer games right now.

more ▼

answered Jul 13 '16 at 08:00 AM

avatar image

116 3 6 7

avatar image luckpolar Jul 13 '16 at 08:46 AM

SORRY,I can't understand your meaning. I create a BP named "Change", and in this BP, I create a box trigger volume to enable my widget... In short, I create a static mesh and box collision.When I go into the box collision and click on the static mesh, the widget HUD which I created shows up. In the Change BP, I bind the different custom events to the event in the Widget BP. I just want to get the target point's location,and how should I do? Thanks.

(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