hit cylinder - Page 2

hit cylinder

Requests for features in the spring code.

Moderator: Moderators

User avatar
ILMTitan
Spring Developer
Posts: 410
Joined: 13 Nov 2004, 08:35

Post by ILMTitan »

But units do rotate along axes other than z, due to uneven terrain, or banking to turn.
Not saying hit cylinders are bad, just that they are not as superior in this engine as you might think.
User avatar
Dragon45
Posts: 2883
Joined: 16 Aug 2004, 04:36

Post by Dragon45 »

Vertical cylinders dont need to be checked for rotation? How about if its a Termite or Spider-type all terrain unit climbing a very steep hill? You're going to have to check for rotation anyway. Might as well make the initial cylinder orientation definable...
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

I'd say give us static cylinders now, bother with rotation later. The cases where static cylinders would be less useful than spheres are few (and in those you could still use a cylinder where height~=radius) while the benefits are obvious: Being able to use height as an active part of the units strategic value. Think about it, in real life tanks are built to be as flat as possible so they expose less when taking cover behind a wall or terrain feature. This would give vehicles an edge over bipedal mechs like kbots. In mods where that isn't intended the mechs might need increased hitpoints, although that wouldn't be too realistic either (more moving parts = more space taken up by vulnerable joint assemblies = weaker average armor strength) it should make up for the difference. Also you could have vehs in front of the bots with the bots able to shoot over the vehs and the vehs soaking up the brunt of the damage.

Besides, a hit cylinder wouldn't require any change to s3o as you can just use its radius and height values.
bamb
Posts: 350
Joined: 04 Apr 2006, 14:20

Post by bamb »

Yeah, as I wrote in my very first post, and all the others too, if you read them :evil: , it sucks for units, since they are tilted. But buildings aren't. But if buildings already use boxes, this idea is obsolete.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Screw rotation, that's rare enough to not really matter.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Post by Pxtl »

FireCrack wrote:That's excelent...

But what is used for unit-unit colossion then?
I'm pretty sure just the groundplate or yardmap are used for mobility collisions, and the spheres are only used for projectile collisions. In such a case, collision-bodies could be manipulated any which way.

Imho, the best solution is FBI-defined collision spheres, where the modder can define as many spheres as he like and the tags be (1) anchor part, (2) radius, and (3) offset from anchor.

Thus, by stacking 2 or 3 spheres on top of each other (or orienting them in a square) you could model other shapes vaguely. Woudlnt' be perfect, but it woudl be better than trying to fit every unit into a single sphere.
User avatar
mehere101
Posts: 293
Joined: 15 Mar 2006, 02:38

Post by mehere101 »

+1 for multiple spheres.
User avatar
Dragon45
Posts: 2883
Joined: 16 Aug 2004, 04:36

Post by Dragon45 »

Rotation not common enough to matter? You're confusing rotation along certain axes with rotation in general. With a unit climbs a steep hill, its hitcylinder will need to rotate about the Y axis to compensate for the climb

what about during dogfights? planes spin all the time.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Post by TradeMark »

It would be only used to buildings, so rotation doesnt matter.

Where were these used anyways? Ive spotted that the circles tells where they can shoot, like my laser cant shoot through some other circle because they tries to avoid killing each other.

So are these circles used only for checking bullet collisions faster? (spheres, circles, whatever.)
User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Post by Acidd_UK »

You can see the colission spheres in game by pressing 'b' iirc.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Dragon45 wrote:Rotation not common enough to matter? You're confusing rotation along certain axes with rotation in general. With a unit climbs a steep hill, its hitcylinder will need to rotate about the Y axis to compensate for the climb

what about during dogfights? planes spin all the time.
How often would the rotation of a vehicle change enough to make the hit cylinder grossly inaccurate? Few vehicles can climb steep hills so they would rarely exceed the cylinder. I'm not against implementing rotation at all but I think that has time until a later date because it makes the whole affair vastly more complex. Remember that the cylinder is still only an approximation and almost nobody would notice that it doesn't rotate (and if your unit rotates often just make the cylinder as high as it is wide).
User avatar
Dragon45
Posts: 2883
Joined: 16 Aug 2004, 04:36

Post by Dragon45 »

The problem of course is that those "few cases" can very quickly wreck a modder's day.

And if a new cylinder system is properly implemented in the first place, then adding rotation into the system is simple at worst, trivial at best...
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Calculating the rotation isn't that easy and requires a lot of math (and will possibly take a performance hit). With a non-rotating cylinder you always know how to treat the axises and it's pretty fast, too. I don't think any other game bothers to rotate cylinders.

Considering how much Spring already slows down with simple sphere collisions I wouldn't want to see what happens if it has to calculate a rotated cylinder for each (an axis aligned cylinder is about as difficult to calculate as a sphere). As I said, just make height=width on your units if you're worried about cylinders, that'll give them a roughly sphereish collision shape.
Post Reply

Return to “Feature Requests”