Research Assignment - TUTORIAL
Throughout Experiment 1, I triggered events for my machinma by using the Input: Key node in my flowgraphs. This was of course, inefficient, and I had figured that there must've been a solution to this problem.
When Experiment 2 began, Vinh Nguyen's demonstration flowgraph
'Average Velocity from Local Player' is how I discovered a nifty little node called Math: Less. Being extremely simple, this returns true or false if value A is lesser than value B and proved to be very useful in Experiment 2. It allowed me to trigger my flowgraphs automatically and constantly by reaction rather than user input. This eventually led me to discover the Math: InRange Node that I used to track XML data and decided what would be done according to its current value.
From my understanding, the crucial difference is that Math: Less is triggered based on one value that acts as a threshold, whereas Math: Inrange has two that restrict the conditions of true or false.
The limits on the usage of the node are limitless. For the sake of this tutorial however, I will be showing you how to move an entity based based on the current velocity of the player.
Due to the simplistic nature of my discovery, this tutorial is designed for beginners and includes the basics on how to get the position of an entity and move it. To sum it up, this tutorial will cover:
- How to obtain and display the velocity of the player
- Converting velocity into a useable value for Math: InRange using Vec3: Magnitude Vec3
- Obtaining the coordinates of an entity using a flowgraph (this is needed for Windows 7 users)
- Moving an entity when the velocity is in between a certain range
The initial tutorial covered how to obtain the position of an entity and moving it through inputting a key. It should provide users without knowledge of flowgraphs a basic understanding on 3 important nodes. The tutorial is 2:56 minutes long. This is NOT my final submission video, but I decided to include it into this post for those who do have troubles with the subject of moving entities.
Input: Key
HUD: ShowHUDMessage
Movement: MoveEntityTo
How to Move an Entity by Inputting a key
My second, and submission video tutorial deals with the actual Math: InRange node it self, focusing more on how to track velocity and using that information and avoids the cluttering explanations on how to move an entity that has already been covered in the tutorial above.
Reference
Move Entity in Sandbox2 using FlowGraph, by Russell Lowe:
http://www.youtube.com/watch?v=mJ9u9NxSyBA&feature=player_embedded
Average Velocity from Local Player, by Vinh Nguyen
http://benv2423-2011vn.blogspot.com/2011/09/re-average-velocity-from-local-player.html
Average Velocity from Local Player, by Vinh Nguyen
http://benv2423-2011vn.blogspot.com/2011/09/re-average-velocity-from-local-player.html