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"

Beginner Question - animating/keyframe over time?

This is a super beginner question...I have a particle system and I want to attach it to something that I can animate over time. For example, how do I do this:

  1. take a sphere and animate it from 0,0,0 to 0,0,100 (keyable frames would be nice)

  2. attach my particle system to this sphere

That's it. Simple. Easy to do in Maya and such, why is it so hard in Unreal? lol Thank you in advance!

Product Version: UE 4.10
more ▼

asked Nov 30 '15 at 09:34 PM in Blueprint Scripting

avatar image

18 2 5 9

avatar image Matthew J Nov 30 '15 at 10:20 PM

Hello dranders,

For doing something as simple as this, it would most likely be best to use a Timeline inside of Blueprints. You can use the timeline to do all different types of things with translation, rotation, scale, and editing all different types of variables/properties.

You can find more on timelines here: https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/Timelines/index.html

As far as attaching the Particle System, you could actually just make the Particle System as a child component of the sphere so that it is always attached but you can also used Attach To at runtime to attach it as well. The Particle System could also use a timeline to affect its particle effects.

avatar image dranders Nov 30 '15 at 10:38 PM

Any chance someone can post an image of how to set up the graph to make the sphere move? I looked at the blueprints page link and I get how to make a curve, but that isn't very complete...doesn't show you how to hook it up. Thanks!

And what's the difference between Event Graph and Construction Script? Thx!

avatar image dranders Dec 02 '15 at 02:28 AM

There are lots of tutorials on how to change values like lights on/off but I'm not seeing a translateX/translateY/translateZ and hooking that up. ANY help would be appreciated...any links, images, etc. Thanks!

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

1 answer: sort voted first

There is not an explicit translate function in Timelines, but locations in UE4 do use Vectors and Timelines can use the same thing.

The first step would be to make the blueprint for the sphere and create a timeline. When you create the timeline, open it up and add a vector graph. You can then name the graph whatever you want. If you wish to only make the sphere move in the Z axis, the next step would be to click the Eye icons beside the X and Y to hide those lines and only show the Z then add at least two keys by Shift-Left-Clicking on the graph. You can then set these keys to any time/value values that you wish. In my example, I used one key at 0 time and 0 value and a second key at 5 time (seconds) and 100 value. Be sure to check the "Use Last Keyframe" option.

alt text

After that, you can return to the Event Graph and start on the logic.

alt text

This is a very simple way to do this and there are certainly better ways but this will work for now. First I set up a variable to store the initial location of the sphere so we can avoid it starting from 0,0,0 when it gets moved. Next is to start the Timeline and hook it up to call "Set Actor Location" every time it updates the value from our graph. I then set it to add the output of that graph to the initial location variable from earlier to ensure that it moves from it's initial location instead of the world origin.

Edit: If the sphere doesn't move, you may gets some warnings in the output log. This is most likely a result of the Sphere being set to Static rather than Movable.

Hope this helps!

more ▼

answered Dec 02 '15 at 03:16 PM

avatar image dranders Dec 02 '15 at 06:55 PM

This is very helpful I think, thank you!!! What are the types of "set" and "+" ...?? I am trying to find them in the zillions of named nodes in UE4 and don't see them....thank you!

PLEASE let me know if you have a better idea of how I can achieve this motion, as this seems way more complicated than it should be. Here's an example (the rotating around): https://www.youtube.com/watch?v=VXufN5nTJFw

Thank you!

avatar image Matthew J Dec 02 '15 at 07:19 PM

The set node is dependent on having a Variable. When you have a Variable in your blueprint, you can Get or Set that variable by right-clicking in the event graph and typing "Get variable name" or "Set variable name". The + node is a Vector + Vector node, it should appear if you drag off the Timeline's Vector (yellow) output and then enter + into the node search.

As for your other issue, it would be best to make a second question for that as this question has been answered. It's good to keep each question on-topic as much as possible.

(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