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"

Update single vector position in blueprint

New to this, trying to just update the position of an Actor blueprint in itself, so that when it is spawned, it keeps moving in one direction. Trying to do the most basic thing, and it crashes the engine with this code active, all the 4.20.3 nonsensical crashing aside. This is what my blueprint currently looks like:

alt text

  • Begin event should set up variable I've defined in C++ (it's a BlueprintReadWrite variable)

  • A vector is made to update new location

  • New location is added with the current one

  • New location update after Event Tick starts executing, which should be every frame

Product Version: Not Selected
more ▼

asked Dec 28 '18 at 07:41 PM in Blueprint Scripting

avatar image

11 2 3 4

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

1 answer: sort voted first

you should use AddOffset instead

alt text

I used player pawn, but in your actor you can leave it unplugged so it defaults to self.

0.png (68.7 kB)
more ▼

answered Dec 28 '18 at 07:50 PM

avatar image

1.7k 8 4 8

avatar image L11777 Dec 28 '18 at 08:51 PM

I was about to ask what on earth you are talking about, but it's that I needed to replace SetActorLocation module with AddActorWorldOffset.

Either way, turns out my blueprint was CORRECT, I just had extra C++ code running in the background that was trying to do a similar thing and was crashing everything. AddActorWorldOffset didn't work for this however, even stopped the Actor from spawning completely, or may be something else happened that I could not see during runtime that was not correct. Thanks for trying to help tho.

(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