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.
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
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.
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
Start playing around in the level blueprint where Tick Event is guaranteed to work
Hi, Rama, thanks for the information. The problem will be better shown in an image:
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?
#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.
Actually you need something more to achieve your goal. I’m attaching also the asset itself for you to play with
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.
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.
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
Good point, I didn’t know I could do it, I’ll do it from now on.
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!
OK, nice; the orange “resolved” mark is more efficent.
I have similar problem. Please have a look on my issue. I tried you solution but not working… please share your views…
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.