Stupid Question: hitsphere evaluation efficiency - Page 2

Stupid Question: hitsphere evaluation efficiency

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

User avatar
MadRat
Posts: 532
Joined: 24 Oct 2006, 13:45

Post by MadRat »

Probably could save people alot of hassles with footprint settings if somehow Upswing could measure the model dimensions and display a "suggested footprint size".
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

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

Post by KDR_11k »

MadRat wrote:Probably could save people alot of hassles with footprint settings if somehow Upswing could measure the model dimensions and display a "suggested footprint size".
Just look at the grid it displays.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

I have my own question regarding hitspheres; Any way of manipulating weapons and hitspheres so that the x,z passed to HitByWeapon are always from the side that is actually hit, rather than occasionally from the opposite side? :(
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

That would require making weapons check for collision on the line between their old and new position (use the beamlaser code if in doubt) instead of only checking at the positions themselves. Would be great if that were implemented, it'd also avoid the problem of fast weapons travelling through small targets without connecting.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Post by FLOZi »

KDR_11k wrote:That would require making weapons check for collision on the line between their old and new position (use the beamlaser code if in doubt) instead of only checking at the positions themselves. Would be great if that were implemented, it'd also avoid the problem of fast weapons travelling through small targets without connecting.
Actually, it wouldn't, tracing the ray would be pretty pointless on a ballistic weapon as there could be another unit/feature between where it hits and where it collides.

You're on the right track though. It should be possible to determine the angle relative to the map which the weapon collided just from the start and end positions, no need to trace all points along the line.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Why not use a 3-point, two-ray approximation? That'd take care of curving shots as well as straight ones- put the top point at the top of the arc.
Post Reply

Return to “Engine”