Implementing an initial velocity
Let’s go back to the example of throwing a ball, which we explained at the beginning of this chapter.
If we throw a ball, we’re giving our ball an initial velocity by throwing it.
We can simulate this phenomenon in our node tree as well, which is surprisingly easy.
All that we have to do is add a Store Named Attribute node right after where we define that our age value is 0, as our Points are created.
Once again, let’s enter vel as our name and set the datatype to Vector, as you can see in Figure 17.5:
Figure 17.5: Initial velocity creation
In this Store Named Attribute node, we can define the starting velocity of each point. For example, if we enter a value of 0.2 on the X axis and 0.3 on the Z axis, we can see that our Points get shot up and forward, as you can see in Figure 17.6.
Figure 17.6: Points get shot up and forward
Let’s also drag the Value input of the Store Named Attribute...