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"

Move an actor in his local axis orientation using blueprint.


I would like to craete an asset that I can re-use in my level, it's an arrow.

I want to be able to place it where I want and rotate it to indicat a direction. The problem I have is I don't know how to move an actor along his local axis, the set location is always in world space or parent space, but not the actual actor space.

Just to make sure you understand, I want to animate it using a blueprint. I'm sure it's something easy to manage, but I can't figurite out :/

Many thanks !


Product Version: Not Selected
more ▼

asked Jun 27 '14 at 11:32 AM in Blueprint Scripting

avatar image

46 13 12 19

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

2 answers: sort voted first

Hey there!

The way I'd do this is to simply calculate a new position for my object based on the forward vector which points along the local X axis of the object.

Simply multiply the forward vector by the amount you want to move the object, this will return a vector for you, now add this vector to the current position of your object and you're done, you can now set your actors location to this new vector you just calculated. I've included an example that will move my object 4 units along it's local X axis every second (So it moves in the direction it is facing).

alt text

I hope this helps! If you have any further questions please let me know.

example.png (203.0 kB)
more ▼

answered Jun 27 '14 at 02:06 PM

avatar image

180 10 10 22

avatar image Calemike Jun 27 '14 at 02:59 PM

Thank you so much Spider, I didn't know we can get up/fowrad/right vector of an actor :) So usefull !

Thanks a lot !

avatar image Rockseller Mar 26 '16 at 08:51 AM

@Spiderhund Even though this is an old question just wanted to stop and say thanks because this is simple and great

avatar image Spiderhund Mar 26 '16 at 12:11 PM

You're welcome, as long as it works I'm happy :P

avatar image z00m3r Jan 09 '17 at 06:18 PM

Spiderhund's solution worked for something that I've bben trying to solve all day (it's evening alread :))

now if only I could figure out how to do the transition over time...

avatar image Spiderhund Jan 10 '17 at 02:18 AM

Hey, sorry for the late reply, I don't know if you have a solution to this yet but you can use a linear interpolation on the rotation of your actor to make it rotate over time. I've included an example that will rotate towards the player position over time.

alt text

lerpexample.png (202.9 kB)
avatar image z00m3r Jan 11 '17 at 02:18 PM

Hi Spiderhund,.

I used a timeline. It works, but the movement is inconsistent (i.e. sometimes it will move slightly more, sometimes slightly less....)

I've given up on corner functionality for now and decided to build my runner without corners, with some curvature shader...just like subway surfers and the like.

I could send you some blueprint screenshots to take a look by e-mail or PM. I'm not even sure if this forum or board or whatever it is even lets you PM another user :)


avatar image steve1222 Sep 23 '18 at 01:41 PM

I'm not sure how your using the timeline, in that case it could be due to the interpolation type between beginning and end of a frame.
Otherwise, mite mention these people also missed an important well known step, where you multiply the intended change in value/speed, etc. by the elapsed time since the last frame update(delta time), since the amount of time in between each frame/tick changes with every running tick. alt text

FYI was facing similar problem by coincidence, and so in this example I used a right vector instead of forward vector, which is similar concept but 90° to the right of the forward(front) facing direction.
I did this to correct the import orientation of my skeletal mesh, which faces the Y axis as its intentional front direction.

It would seem skeletal meshes are controlled by their bones and cannot be rotated on their own, unless they are not a root component and can instead follow a parent's rotation.

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

Nice solution using vectors to move locally. I did this for moving an actor using a timeline to move along time. Hope will useful for you.

alt text

capture.jpg (153.7 kB)
more ▼

answered Nov 29 '18 at 09:19 AM

avatar image

1 1 1

(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