@aron_granberg
In your example scene you have pretty heavy acceleration on the units. I don’t thiink I’ve ever seen in a RTS or MOBA game that actually does it.
And that’s why I suppose there is the configurable Acceleration in the RichAI.
However, increasing the acceleration to 999 actually causes pretty erratic behavior
I’d recommend you to test it with instant acceleration more.
Whats the happy path way to make characters stop when destination is crowded?
Here I’ve drawn characterController.aIBase.rvoDensityBehavior.lastJobDensityResult on screen (“is crowded”) and it seems to like I could tell the characters to just to stop on based on that.
I suppose I could just disable the RVO controller but if another character wanted to walk through that character in any time future, it wouldn’t be able to avoid it.
RichAI seems to have some settings for this but I couldn’t figure out if they have any effect. This is my setup.
Are you using any custom movement code for your units?
The RichAI script should start slowing down approximately 0.1 seconds after lastJobDensityResult becomes true (delay is to filter out noise) and it does not seem to get much closer to the target (you can check this value under “RichAI -> Debug Info -> Progress Average”).
Also. You may want to set individual target points for the agents to make it look better (it should look better than what you are showing in the video though… I’m not sure why they are not stopping).
Take a look at RTSUnitManager.MoveGroupTo.
The logic for that function is as follows:
If the target is far away from the group then give every unit an individual target point which keeps its relative position in the group. If the target is very close to the group or even inside it then make every unit try to move to the target.
This matches the behavior in games like SC2.
Speaking of this video, I don’t seem to find all this functionality in the included demo scene… for example the waves don’t seem to happen. Am I missing something? or maybe its by design or can we expect all that to be included at some point?
There are some other strange things there. Why is the speed and velocity always zero, yet the agents are moving? (the progress averge is set to 1 if the agent’s desired speed is zero, which is why I’m asking).
Heres the same kind of video, but where speed = richAI.velocity.magnitude velocity = richAI.velocity is crowded = aIBase.rvoDensityBehavior.lastJobDensityResult progress average = aIBase.rvoDensityBehavior.progressAverage
@sepnax That is very odd…
Would it be possible for you to share your project with me so I could take a look? You seem to be the one most heavily using the RTS beta stuff and I’d love to figure out how to make it work properly in an actual game (example scenes do have a tendency to not hit all the edge cases).
In both Unity 2019.3.0b7 and 2019.3.0f3, Example18_RTS in the current beta project (dev_4_3_11_59993326) isn’t working - the units just float up without stopping.
There are errors every frame for each crystal:
UnassignedReferenceException: The variable offsetRoot of RTSResourceDeterioration has not been assigned.
You probably need to assign the offsetRoot variable of the RTSResourceDeterioration script in the inspector.
UnityEngine.Transform.get_localPosition () (at <5e35e4589c1948aa8af5b8e64eea8798>:0)
Pathfinding.Examples.RTS.RTSResourceDeterioration.Update () (at Assets/AstarPathfindingProject/ExampleScenes/Example18_RTS/RTSResourceDeterioration.cs:26)
And in 2019.3.0f3, Burst compilation fails:
Library\PackageCache\com.unity.entities@0.4.0-preview.10\Unity.Entities\Types\TypeManager.cs(431,13): error: Cannot find the field `TypeInfos` required for supporting TypeManager intrinsics in burst
...
I would be happy to provide whatever support or information I can - or maybe this example just isn’t ready for support in this version of A*?