Collision Sphere Problem

Collision Sphere Problem

Share and discuss visual creations and creation practices like texturing, modelling and musing on the meaning of life.

Moderators: MR.D, Moderators

Post Reply
User avatar
Relinquished
Posts: 126
Joined: 22 Jun 2006, 22:08

Collision Sphere Problem

Post by Relinquished »

If anyone cares to help, I'm having problems with the collision sphere, just look for yourself:

Image

all help is appreciated :)
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

spring dicks with the spheres on aircraft. I have asked several times that the devs change it.
SJ
Posts: 618
Joined: 13 Aug 2004, 17:13

Post by SJ »

Its because aircrafts collided too much with each other midair and where hit too easily by lasers etc. So spring halfs the collision sphere for all air units since 0.5b or so.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

Is the collision still an issue? I was thinking of doubling the hitspheres to counter that but if you gents are going to change it I didn't want to make that mistake.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Would a proper steering behaviour not fix the issue of collisions?

The sort of sterring that could steer 600 monsters on a gameboy classic with no lag would do very well here.
User avatar
Relinquished
Posts: 126
Joined: 22 Jun 2006, 22:08

Post by Relinquished »

So doubling the sphere would work? Just because right now that plane isn't getting shot down in-game (actually none of them are) because the sphere is too small
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

The sort of steering that did this, you mean:

Code: Select all

r = rand();

if r > 0.75
  go_up()
else if r > 0.5
  go_down()
else if r > 0.25
  go_left()
else
  go_right()
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

This stupid behaviour should be removed, if the planes are too large it's the duty of the modder to correct that.
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

The related code (as far as I can tell)

Code: Select all

rts/Sim/Units/UnitLoader.cpp:276:
  unit->model = modelParser->Load3DO((ud->model.modelpath).c_str(),ud->canfly?0.5f:1,side);
  //this a hack to make aircrafts less likely to collide and get hit by nontracking weapons

rts/ExternalAI/AICallback.cpp:1063:
  S3DOModel* mdl = modelParser->Load3DO(ud->model.modelpath,ud->canfly?0.5f:1,0);

rts/ExternalAI/AICallback.cpp:1070:
  S3DOModel* mdl = modelParser->Load3DO(ud->model.modelpath,ud->canfly?0.5f:1,0);
P.S. The line numbers are based on taspring_0.74b3
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Its in AI Wisdom 3 IIRC.

You take weight in the direction you want to go and follow it. You then exert counter weights on nearby objects to encourage them to move away from you.

This sort of system is lightweight, fast, proven, scalable, and nice and simple, and it'd do wonders for some of the pathfinding qurks we have.
User avatar
iamacup
Posts: 987
Joined: 26 Jun 2006, 20:43

Post by iamacup »

AF wrote:Its in AI Wisdom 3 IIRC.

You take weight in the direction you want to go and follow it. You then exert counter weights on nearby objects to encourage them to move away from you.

This sort of system is lightweight, fast, proven, scalable, and nice and simple, and it'd do wonders for some of the pathfinding qurks we have.
collision detection not pathfinding :P
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

It is pathfinding on a very basic level. For one its a very poor collision detection routien because there are conditions where it would overlap units onto eachother if cramped together.

It was used as pathfinding in consoles in the early days, a weight would be placed on the object moving to pull it towards a goal position and it would maneuver around other objects which exerted counter weights. It works best when guided by a more generlised pathfinding system to place multiple goals.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

trepan wrote:The related code (as far as I can tell)

Code: Select all

rts/Sim/Units/UnitLoader.cpp:276:
  unit->model = modelParser->Load3DO((ud->model.modelpath).c_str(),ud->canfly?0.5f:1,side);
  //this a hack to make aircrafts less likely to collide and get hit by nontracking weapons

rts/ExternalAI/AICallback.cpp:1063:
  S3DOModel* mdl = modelParser->Load3DO(ud->model.modelpath,ud->canfly?0.5f:1,0);

rts/ExternalAI/AICallback.cpp:1070:
  S3DOModel* mdl = modelParser->Load3DO(ud->model.modelpath,ud->canfly?0.5f:1,0);
P.S. The line numbers are based on taspring_0.74b3
I was thinking of implementing an fbi tag to scale 3do hitspheres. Easy enough to do, on the whole, but what's going in AICallback.cpp?

edit: nvm, easily fixed the way i did the tag
Post Reply

Return to “Art & Modelling”