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"

How to move an actor in a certain direction and velocity?

Hi, I would like to know how to set a Blueprint actor (in this case with a static mesh and a particle system) so the whole actor moves in a certain direction and at a certain velocity. I've tried MoveTo, Move To Actor, etc. but it's not moving at all, and I don't see how to control the velocity. If there were already tutorials or documentation on this I would not be asking this, it must be pretty simple.

Product Version: Not Selected
Tags:
more ▼

asked Mar 22 '14 at 11:05 PM in Blueprint Scripting

Albert Espín gravatar image

Albert Espín
832 76 87 353

Pino of DFT Games gravatar image Pino of DFT Games Mar 24 '14 at 08:43 PM

Hi, just as a reminder, once a question is answered and you mark it [SOLVED] you should also chose the answer that was the solution ;)

Albert Espín gravatar image Albert Espín Mar 25 '14 at 08:45 PM

Good point, I didn't know I could do it, I'll do it from now on.

Ben Halliday gravatar image Ben Halliday STAFF Mar 25 '14 at 08:47 PM

Actually, please don't bother with the [Closed] or [Answered] tags. They were a temporary solution to an internal reference problem that has since been solved.Thanks for the effort, though!

Ben Halliday

Albert Espín gravatar image Albert Espín Mar 25 '14 at 08:50 PM

OK, nice; the orange "resolved" mark is more efficent.

Xavier Martin gravatar image Xavier Martin Feb 04 '16 at 06:23 PM

HI, I'm trying to use that script to move my character to the place I clicked on a given surface, so I can't use the event tick, since I want the character to move only after the click. I've tried to use a while loop condition by a "is different" node comparing the character location and the click impact location but i get an infinite loop... Here's the blueprint. It would be a great help if someone could check this or simply throw ideas at it.

Cheers !!

alt text

salar_khn gravatar image salar_khn Feb 21 '16 at 07:17 PM

https://www.youtube.com/watch?v=THCR9p5mIz0 i found this hope it can help you.

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

5 answers: sort voted first

Hi,

Actually you need something more to achieve your goal. I'm attaching also the asset itself for you to play with ;)

Full Network

-Pino

movecube-01.png (134.5 kB)
movecube.zip (73.4 kB)
more ▼

answered Mar 23 '14 at 11:42 AM

Pino of DFT Games gravatar image

Pino of DFT Games
111 4 16

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

Moveable

Step 1 is that the static mesh actor must be set to Mobility Moveable, select your SMA and press F4 or look at the properties window if it is loaded already

Tick Event

Step 2

Use the tick event of the level blueprint to incrementally move your mesh over time.

The amount you move per tick is the speed

Choose from the available actor move BP nodes to find the one you prefer for this purpose.

Timer Functions

Ultimately you should move your BP setup into a function that you put on a timer

so that you can start and stop the continous movement whenever you want

The timer update frequency should be looping, and set to something like 0.01 seconds

Look up on this UDN for info on BP functions and timer functions in BP

Level Blueprint

Start playing around in the level blueprint where Tick Event is guaranteed to work

Enjoy!

Rama

more ▼

answered Mar 22 '14 at 11:12 PM

Rama gravatar image

Rama
9.5k 419 297 1004

Rama gravatar image Rama Mar 23 '14 at 09:27 AM

Set Actor Location

Simple move is for AI navigation, that will not work!

Use Set Actor Location instead :)

You will want to convert the actor's rotation or the controller's rotation into a Vector and multiply by some amount like 10, per tick.

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

Hi, thanks a lot for that capture, I've understood many things analizing it. The fun fact, though, is that when using my own one, really similar to yours (mine is in the image below) the object rapidly becames smaller and smaller (and at the same time gets slower and slower) until it's invisible or destroyed somehow.

Do you know what might be making it lower down the velocity and the scale?

My custom variable are:

  • "Rocket_mesh", the name of the static mesh component of the actor, from the Components section of Blueprint.

  • Rocket_distance, a vector with X=10, Y=0, Z=0.

  • Rocket_speed, a float set to 10.0.

alt text

more ▼

answered Mar 23 '14 at 06:08 PM

Albert Espín gravatar image

Albert Espín
832 76 87 353

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

Hi, Rama, thanks for the information. The problem will be better shown in an image:

alt text

As you can see the controller node in "Simple Move to Location" is preventing the whole thing to work, I've tried linking it to "Get Instigator Controller" and to "Get Player Controller", but it doesn't work, in fact I don't know why this would require a controller as this is a Blueprint actor without controller.

Do you know how to solve this?

more ▼

answered Mar 23 '14 at 09:21 AM

Albert Espín gravatar image

Albert Espín
832 76 87 353

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

Hi again, I set my direction and speed variables to be "Exposed at Spawn", and it works now. Thanks a lot!

EDIT: Actually, what possibly made it work was removing a SceneComponent of the Blueprint.

more ▼

answered Mar 23 '14 at 07:03 PM

Albert Espín gravatar image

Albert Espín
832 76 87 353

Pino of DFT Games gravatar image Pino of DFT Games Mar 24 '14 at 08:39 PM

You're welcome :)

Vasanth gravatar image Vasanth Apr 30 '15 at 08:38 AM

Hi guys, I have similar problem. Please have a look on my issue. I tried you solution but not working... please share your views.. https://answers.unrealengine.com/questions/219852/how-to-control-the-speed-of-a-characterobject-by-t.html

(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