Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: zookeeper on January 13, 2011, 09:43:51 am
-
EDIT: This request is nonsense. More information about how collision detection really works in http://www.hard-light.net/forums/index.php?topic=80264.0 (http://www.hard-light.net/forums/index.php?topic=80264.0).
I'd imagine quite a few people have had the same problem: a small multipart turret which is so small that it's difficult to hit but which really should receive damage even if the shot doesn't hit the turret model itself.
A currently possible workaround is to detach the surrounding area of the ship's hull into a separate subobject and link the turret to that and make them have equal hitpoints; shots impacting the turret will carry damage over to their parent subobject and the turret will be destroyed if the parent subobject dies. However, that's pretty messy as you'll have to cut the ship hull up into little pieces and also because you'll end up with one extra dummy subobject subsystem per turret.
So, what I'd find very useful would be a way to link one of those non-physical orb-style subsystems to a subobject subsystem. The details of how it'd work could vary, so here's a couple of suggestions (in order of preference):
1. If there's both a subobject subsystem and an orb subsystem with the same name, they'll be treated as one subsystem. So to give Turret01 a bit bigger hit area I could simply place an orb subsystem named Turret01 into the model.
2. A new subobject property which simply specifies a radius: any hit landing within that radius (measured from the center of the subobject) count as a hit on that subsystem.
3. A new subobject property which determines which orb subsystem to link the subobject to. So to give Turret01 a bit bigger hit area I'd place an orb subsystem named Turret01MyBiggerHitArea and then give Turret01 a hit_orb=Turret01MyBiggerHitArea property.
Comments? Some easier workaround I've missed?
Attached is an image demonstrating what I'd want to do. The turret doesn't include the little pedestal it's mounted on, which in turn makes it a really small target: in addition to any hits landing on the turret model itself, I'd like to make any hits landing inside that orb to damage the turret as well.
[attachment deleted by ninja]
-
You could make part of the base a mesh with a transparent texture that still has collision enabled.
-
You could make part of the base a mesh with a transparent texture that still has collision enabled.
Yes, but that's pretty much as bad as cutting up pieces from the hull. You have to account for rotation, etc.
-
So the impact effect might be slightly elevated. I don't know if anyone would notice. Just put a plane right around the base just over the hull, so shots don't ever hit the hull first, and it'll count for the turret instead. If the hull is curved, you'll only barely be able to tell in some places that the shots are impacting above it. With damage spew off, you won't even have that sign afterward either.
-
In terms of textures and model complexity etc the best option would be to use a subsystem/special point type to define the hit area of the surrounding hull, though to be honest i have never had a huge issue with hitting small turrets but this might be usefull.
-
Setting weapons to spread their shots a little could also help.
-
Spread their shots? You mean increase the impact size of the weapon? I don't think we can do that. If you mean spreading the shot grouping, FotG is already set to make them converge, the last thing you want is an X-wing firing even farther away from straight ahead.
-
How about a subsystem table entry, such as +extended_damage_radius: or something?