Atrik Posted 8 hours ago Author Share Posted 8 hours ago 20 minutes ago, Thalatta said: "a circular body is always struck through its centre", I guess this is some non-physical simplification Like a simplification that doesn't account for friction? Link to comment Share on other sites More sharing options...
Thalatta Posted 8 hours ago Share Posted 8 hours ago 2 minutes ago, Atrik said: Like a simplification that doesn't account for friction? I see, tangential forces would need friction to act. And I guess including that might cause a bunch of other problems, like units getting quite stuck. Link to comment Share on other sites More sharing options...
nifa Posted 8 hours ago Share Posted 8 hours ago ok, another random guess: Maybe we could use an additional force, where an idle unit clears the path for an allied moving unit, before they are colliding, when it's blocking the way? The blocking unit would just slighty move to the side, but only if there is space available 1 Link to comment Share on other sites More sharing options...
Atrik Posted 8 hours ago Author Share Posted 8 hours ago (edited) 38 minutes ago, nifa said: Maybe we could use an additional force, where an idle unit clears the path for an allied moving unit, before they are colliding, when it's blocking the way? The blocking unit would just slighty move to the side, but only if there is space available It is kind of the case depending on how you look at it : We could say that units aren't actually pushed, they just look at every neighbor that look too close to them, then they move away from them. Consuming all forces they calculated, tells them where they have to go for this turn. So it's them actually moving away.. Well since all that is a bit some abstraction of physical events probably there are as many way to phrase it as you want. Edit : I meant is that the pushing range is already some kind of way to communicate to units to move away. But maybe if you wanted to add one that apply only to allies but further then the normal push one, it could be a good idea for example for rams where you want them to push allies but enemy can still block the way. It's a good idea. Edit 2: Now I have regret dropping my initial approach about a forward area in front of units used for charging, that would be maybe a few lines of codes to just make it possible to apply to allies only... 38 minutes ago, nifa said: ok, another random guess: I'm glad for the involvement, it shows that this is an interesting topic and that many things will sprout out of it. In fact, a big highlight of this project is that it will be easy, even from a mod, to plug in forces into UnitMotion. Examples : weather, spells (attractions, repulsion)... Edited 7 hours ago by Atrik Link to comment Share on other sites More sharing options...
guerringuerrin Posted 4 hours ago Share Posted 4 hours ago (edited) 9 hours ago, Atrik said: But I have a feeling it's doable, let's see if @guerringuerrin find a way to prove we are still far off succeeding. I managed to block my 24 elephants again. The gaps they tried to pass through are quite small. I’ll clarify again here that I’m deliberately trying to push things a bit. Spoiler Narrow Path 1.mp4 In particular, I’d like you to look at what happens with the group at the bottom, which has a visibly wider path than the group at the top. The first elephant goes straight through, but the second one, which is coming slightly from the side, collides with the house and turns to its left to try to go around the house. However, there is no longer enough space for it to make the 90-degree turn, so it gets stuck at the corner of the structure's hitbox + some eles probably pushing it too, and ends up blocking all the eles. Spoiler Slow Motion.mp4 I replicated this with only a few elephants, and something similar happened. It seems that elephants need to make a 90-degree turn to go around a building, avoiding any contact between their hitbox and the corners of the structure. This can be seen in the following videos. There is clearly enough space for the elephant to pass through if it moved diagonally: Spoiler Hitbox Too Big.mp4 The obvious conclusion is that the hitboxes are too large, both unit and building (I'm asuming hitbox are the green ones). They extend well beyond the 3D model that the user sees and create these visual inconsistencies: the elephant cannot pass through a gap that appears wide enough. Having the structure's hitbox larger than the model may be desirable to prevent units from clipping through it and perhaps also help with visual clarity. But for organic bodies, maybe we can cheat a little with this. And I think this is also why I mentioned several times trying to "give them more overlap". But perhaps that wasn’t the right term. Maybe it’s not a matter of giving them more overlap, but rather making their hitboxes smaller. This could help elephants move through gaps that appear wide enough to the user, and it would also prevent them from pushing each other without actually touching, as can also be seen in this same video (00:10). In this last example, we can see an elephant walking around the barracks while keeping an exaggerated distance from the structure's visible boundaries: Spoiler Around Corners Of Buildings.mp4 One final clarification: It’s obvious that destroying the houses is the quickest way forward, and there’s no reason to expect the elephants to organize themselves perfectly and head straight for the fortress. After all, the purpose of this feature is to add more realism and make a huge creature like an elephant somewhat clumsy. However, I think there is still room to improve the visual inconsistencies I’ve shown, where there appears to be enough space for an elephant to pass through, but it nevertheless gets blocked. I think most users will consider these visual inconsistencies a bug, and they can make the experience somewhat frustrating. That’s why I keep pointing them out as something that I think needs to be addressed. Edited 4 hours ago by guerringuerrin 1 Link to comment Share on other sites More sharing options...
Thalatta Posted 42 minutes ago Share Posted 42 minutes ago 3 hours ago, guerringuerrin said: The obvious conclusion is that the hitboxes are too large, both unit and building (I'm asuming hitbox are the green ones). They extend well beyond the 3D model that the user sees and create these visual inconsistencies: the elephant cannot pass through a gap that appears wide enough. Reducing hitboxes might solve the issue with the wider path from your first video, but the narrow one would remain. It's like chasing the issue. I think hitbox shape might be more determinant: in tight spaces, vertices complicate rotating and straight sides give too much front for static equilibrium. Maybe elliptical shapes with increased on-center repulsion range to avoid compact tiling might be worth a try (since that seems to be the only problem about them, for now). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now