Today, I'm learning how to implement for loops in game development. I also learn a node that can call an event every time we decide it. The image below showing I call the event every 2 seconds.
The first one holds the closest distance (float)
The second one holds the closest object (an Actor or else)
The idea to find the closest object can be separated into some parts:
1. We put the closest distance as highest as we can like put the value 100.000.
2. Get all the actor to see the location
3. Check the distance with self.
4. Compare the distance with the closest distance variables. For example if the distance is 20. 20 is less then 100.000, then we set the closest distance variable with 20 and closest object value with the object.
you can see my blueprint below.
0 comments:
Post a Comment