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:

  • 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

you should use AddOffset instead

263518-0.png

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

1 Like

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.