Over 11,000 five-star assets

Rated by 85,000+ customers

Supported by 100,000+ forum members

Every asset moderated by Unity

Home
Tools
Behavior AI
This content is hosted by a third party provider that does not allow video views without acceptance of Targeting Cookies. Please set your cookie preferences for Targeting Cookies to yes if you wish to view videos from these providers.
1/7
Update 1.6
This is my RTS movement asset, it uses vector flow fields to direct troop movement.

Quick Start
-----------


Drag the FlowFieldManager prefab, located in the Prefab folder, into the scene hierarchy. Attach the Unit script, located in the Script folder, onto your unit and drag the reference to the UnitType scriptable object, into the Unit script on your unit. Make a prefab of this unit. You should now be able to directs your units with flow fields.

Documentation
-------------


This is a unit movement asset, but there are other features that I added to aid the development. Camera control and unit selection system.

The FlowFieldManager
The FlowFieldManager is a singleton that is responsible for dynamically creating, enabling, pooling and resizing the vector flow fields. It also manages flow field vector object pool and managing unit groups.
There are a few variables in the inspector: Show Flow Fields - shows or hides the vectors in the flow field. FlowField Prefab - The reference to the flow field prefab.
Ffv Prefab - The reference to the vector prefab that will populate flow field. Unit Selection Max - The maximum units you can select at a time.
Circle Selection Max - The maximum size that the section circle can have.
Padding for Vectors - how much padding to add around the outside of the flow fields when setting size.

FlowField
Goal Prefab - The reference to the target position the vectors point to.

Units
Units are affected by the flow field vectors. There are a two fields in the inspector.
Unit Type - A reference to an instance of the UnitType scriptable object. It contains data for movement speed, turning speed and unitType name.
Unit Selection Sprite - hides/shows when unit is selected/deselected.

Obstacles
Any object that does not contain a Unit script is regarded as an obstacle. This is not a complete all in one solution, the units would still benefit from some basic Ai and obstacle avoidance.

Selecting Units
To select a single unit just click on it. To select multiple units or deselect a unit hold down the control key.
The unit selection system has the ability to select multiple units and to save and recall those selections. You use the top number keys 1-0 and the control(or shift if in editor mode) to save the current selection, you press the corresponding 1-0 key to recall it.
Draw selection, click at the center of a group of units, drag away to increase circle size.

This has been developed in 2D for 2D.
If there are any bugs or problems with using this asset don't hesitate to leave a comment or send message. Thanks.

RTS flow field movement system

(not enough ratings)
42 users have favourite this asset
(42)
$9.99
Seat
1
Updated price and taxes/VAT calculated at checkout
Refund policy
This asset is covered by the Unity Asset Store Refund Policy. Please see section 2.9.3 of the EULA for details.
Secure checkout:
Supported payment methods: Visa, Mastercard, Maestro, Paypal, Amex
License type
File size
116.3 KB
Latest version
1.7
Latest release date
Feb 26, 2020
Original Unity version
2018.2.10
Support
Visit site
Quality assets
Over 11,000 five-star assets
Trusted
Rated by 85,000+ customers
Community support
Supported by 100,000+ forum members
Unity logo
Language
Feedback
Partners Program
Partners
USD
EUR
Copyright © 2025 Unity Technologies
All prices are exclusive of tax
USD
EUR