Hello, Unity folks!
I’d like to share what I have so far
first of all, Eng is not my first language, so please understand my poor lang
This is a simple vectorfield(aka flowfield) for Unity, still WIP and supports only 2D, which means only X and Z positions of the object are updated on the field. (if you are interested in vectorfield / goal based path finding)
The system consists of 3 parts:
- Fluxsystem class is the main class that initiates & calculates the field.
- Cell class is holding infomation of its & neighbors’ location in the array.
- flow class is for looking up vector in the cell in the field and updates object’s position.
demo scene and source code are avaible on Github :
https://github.com/sendtogil/Fluxsystem_Unity
Please fork and modify as you want!!
let me know if you have any question or suggestion.