Preventing units from running on collision sphere intersect

Preventing units from running on collision sphere intersect

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Preventing units from running on collision sphere intersect

Post by KDR_11k »

Currently a unit that has its collision sphere intersect with that of another unit will turn away and run. Can we please diable that (or at least let modders use a tag for that)? It makes no freaking sense and it makes melee more difficult because if the units move too close to each other they turn around and run instead of standing and fighting.

Is that meant to make units exit factories? If so I'd like the behaviour limited to when one of the units is a factory or has a certain tag (which would default to true for factories and false for everything else).
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Um, it's actually the square, not the sphere, unless something changed since my last major testing run on pathing, etc. The only part of the actual S3O that is involved (if that, never confirmed it) is the centroid itself. However, it's probably just the origin of the square, not the true centroid in the S3O.

As for your specific problem... if the spheres are now causing this behavior (again, I don't think that's what's going on, but you can test easily enough) ...then shrink the spheres enough to prevent it, it won't really change anything too significant- you can just as easily simulate arrows or whatnot with a small AOE radius, to make sure they hit enough to be relevant, etc.

Just my $0.02 on this- I think "fixing" it like you're wanting would require major alteration to the pathfinder code.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

1) The "pushing" happens when unit footprints
overlap, not when their collision spheres intersect
(easily verified by testing with a unit whose footprint
is much smaller than its sphere).

2) It's there to ease navigation for sluggish units,
so they don't have to turn as much when something
is blocking their path.

3) Disabling it is possible, but not something to be
done unconditionally (I'm willing to add a tag, but the
default behavior stays ;)).
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Either way it's a big hurdle for melee, having a melee unit turn around and move away usually means it'll die without fighting. Making the collision sphere small only works partially, when I do that with e.g. bipeds I can only cover a part of their body in the sphere and they become hard to select and shots have a higher chance of just going through them without colliding.

The tag could default to 1 for units above a certain mass or something but I really need that tag.
Post Reply

Return to “Feature Requests”