Maybe it’s when the speed is small.
or
Maybe it happens when it’s all already clumped together.
Maybe not, but I think it happens a little better in both cases.
How can I solve it?
Also, is there a way to make it evenly surrounded without going to one side?
Would you be able to get any video footage of this so I can see a bit better how they’re moving? Also out of curiosity, did you go with RichAI for any specific reason?
I don’t know how to program ECS, so I chose RichAI.
I noticed that the current logic is twisted. animator.deltaposition.x shouldn’t have been multiplied by Time.deltaTime, but I was only moving to _rvocontroller.calculateMovementDelta (transform.position, Time.deltaTime). I fixed it and it’s moving too fast. How do I solve it? I want to get it to work with root motion.
Previously, when I thought it was moving in root motion, “_rvoCcontroller.CalcateMovementDelta” actually got pretty much everything moving, and “nextPosition.x = transform.position.x + (animator.deltaPosition.x *Time.deltaTime)” barely moved. It seems like it keeps getting pushed, maybe because it’s moving as much as the real animator deltaPosition.
All I want is for the enemies to surround themselves without pushing each other.
I’ve only been doing this side for a few days now, but I can’t see a solution. Please reply.
Please excuse the response time as I’m typically unavailable over the weekend.
So do you want them to neither overlap or push each other? What’s your desired interaction between agents that bump into each other? From the original post, if you want them to surround the player, you may want to bump up their Radius a tad bit.
Not fully getting what you mean by no siege here, could you explain that a bit?
I do want to note here that you don’t need to do any ECS yourself with FollowerEntity. ECS is just the basis for how it works under the hood. For the most part you interact with it not too much differently than how you use RichAI. It’s not necessary to switch to FollowerEntity or anything, but it’s worth noting for the future
I think this is the main question I still have. If you could let me know exactly what you’re wanting the enemies to do I think I could help here It sounds like you want them to surround the player using RVO and pathfinding to get to the player, then when they are close, you want them to only use root motion, but without overlapping and without pushing each other?
Yes. That’s right. I want to have enemies approach the player, surround them, and attack them. Don’t let the enemies push them too far without overlapping each other. Root motion is currently only applied in special situations.
Of course, it would have been nice if I could integrate the movement of root motion and rvoccontroller without using AI.canmove, but I didn’t find a solution.
So, we decided to apply root motion only in special case
Okay now I’m with you I get it more now. Can you send me a screenshot of your player’s components as well as your agent’s components? I want to recreate this on my end.
I have another question for you: are they pushing the player even when they’re not attacking? Or only when they attack with root motion?
Fixed it to make enemies move with AI by default. Also, if enemies are attacked, they use the value of root motion to push them away.
I’m sorry for the delay in my response.
I’m wondering if this is a scenario where you may want to write your own modifier to nudge enemies to circle around their target if they can’t get to them directly. @aron_granberg what do you think of this? Is that idea overkill?
I’m wondering if this is a scenario where you may want to write your own modifier to nudge enemies to circle around their target if they can’t get to them directly.
I don’t have a clue how to squeeze this part you told me.
Aron wrote some documentation on how to write your own modifiers here. I will admit though this may not be extremely straightforward, but I don’t think there’s a drop in solution to having them surround the player more evenly. Writing a modifier will require you to kind of think how you want their paths to work pretty granularly.
That said, this also gives you the most options. If you’re having troubles getting started, here’s an idea off the top of my head: You could make a modifier where the closer the enemy is to the player, the more their paths attempt to 1) stay away from existing paths of nearby agents and 2) get the position of agents around the player, and use something (possibly Vector3.Dot?) to find a position that’s the most “exposed” and alter their path to go to that point instead of directly to the player— this is all pretty obtuse but as far as I’m aware, this is the kind of thing that would be difficult to get through existing settings.