Help with programming QuickStart 5
Hello, I tried searching for this answer on the hub and didn't have any luck, was wondering if any of you guys would be able to help me out. I'm new here and was following the programming quick start guide and got to the part which asks you to:
Add periodic motion on the X and/or Y axis, and multiply the DeltaTime value by a number between 0.6 and 1.4, so your FloatingActor appears to float around freely. This can look great for powerups!
Was wondering if anyone could tell me how that would like in code.?
Currently I have this in my tick function
How could I make the floating actor seem a little more randomly floating in the air, rather than floating from one end of a diagonal to another? Was playing around with the rand() function, wasn't sure if that was the right one to use. Any help is appreciated, thanks.
asked Aug 11 '15 at 06:36 PM in C++ Programming
Please note that you can use
However, it is also possible to move the actor instantly to the specified location with
For more complex movement logic you can use AI Controlled Pawn.
In Unreal Engine 4, AI functionality is implemented with the help of Behavior Tree object. In particular, it has Move To function:
With the help of Get Random Reachable Point in Radius node, you can get the TartgetPoint for Move To function:
If you like to learn more about Behavior Trees in Unreal Engine 4, please go here: https://wiki.unrealengine.com/Blueprint_Behavior_Tree_Tutorial
Hope this helped!
Hey, I would suggest a Curve
You can edit this curve in the asset browser and then just access it's values via
This gives you or your designers full control over the effect.
Alternatively just make a Timeline in Blueprint and animate the Powerup this way.
answered Aug 06 '16 at 02:01 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here