Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Atalhlla on January 11, 2004, 03:03:15 pm

Title: Rotating sub objects
Post by: Atalhlla on January 11, 2004, 03:03:15 pm
So, we know you can spin sub-things in the game.
Out of curiousity, is it possible to have a turret on a spinning subobject?
Is it possible to have a /two part/ turret on a spinning object?
And, has any one tried this before?

~Atal
Title: Rotating sub objects
Post by: mikhael on January 11, 2004, 03:16:02 pm
I think the answer is a categorical 'no'. But let the others weigh in before you take my word for it.
Title: Rotating sub objects
Post by: Taristin on January 11, 2004, 03:49:47 pm
Depends on how you do it...

If it's in the axis of an object, like in the centre of the Anuket's claw, you can...
Title: Rotating sub objects
Post by: aldo_14 on January 11, 2004, 04:52:55 pm
I think you can only attach a turret if the normal doesn't change with the rotation.

Somehow i doubt 2 part is possible for this reason.
Title: Rotating sub objects
Post by: diamondgeezer on January 11, 2004, 10:23:42 pm
But then a ship can roll so the turret normal isn't facing up or down... so maybe a subobject culd do the same

I say suck it and see :nod:
Title: Rotating sub objects
Post by: IPAndrews on January 14, 2004, 05:57:09 am
The geometry goes around with the subobject but the fire point and fire normal stay where they started. It's quite funky.
Title: Rotating sub objects
Post by: KARMA on January 14, 2004, 06:18:28 am
and is possible to have rotating subobject on other rotating subobjects?
I'm thinking at the BW, where the cockpit stay still and the main body rotate around it, with the wings attached to the body  rotating too
Title: Rotating sub objects
Post by: Flipside on January 14, 2004, 12:07:08 pm
It would be great to have normals and firing points that rotate with any turrets that are attached to rotating subsystems, but I expect it would involve a lot of re-writing of some particularly unpleasant coding :(
Title: Rotating sub objects
Post by: Kazan on January 14, 2004, 12:13:25 pm
sounds like we should modify the turret code to keep the firepoints relative to the current geometric center of their parent object - not assuming a fixed geometric center in relation with the LOD0 'main object' so we can put turrets on rotating sections - it would make some VERY interesting weapons (imagine a rotating ring of Mjolnir#Home aroud a jump node - rotating rings on capships with heavy weapons batteries - decreasing number of required turrets while increases the area they cover
Title: Rotating sub objects
Post by: Flipside on January 14, 2004, 12:25:08 pm
If I read this right, this means you would have to make turrets sub-objects of the rotating part rather than attach them to the hull? So that the SCP knows what rotation parameters it should be obeying?
Title: Rotating sub objects
Post by: Nuke on January 15, 2004, 11:42:43 am
it would be cool
Title: Rotating sub objects
Post by: Goober5000 on January 15, 2004, 12:27:20 pm
Quote
Originally posted by Kazan
sounds like we should modify the turret code to keep the firepoints relative to the current geometric center of their parent object - not assuming a fixed geometric center in relation with the LOD0 'main object'


That's an interesting point.  Could this be why the turrets don't work properly on the sides of ships?
Title: Rotating sub objects
Post by: aldo_14 on January 15, 2004, 01:53:00 pm
Quote
Originally posted by Kazan
sounds like we should modify the turret code to keep the firepoints relative to the current geometric center of their parent object - not assuming a fixed geometric center in relation with the LOD0 'main object' so we can put turrets on rotating sections - it would make some VERY interesting weapons (imagine a rotating ring of Mjolnir#Home aroud a jump node - rotating rings on capships with heavy weapons batteries - decreasing number of required turrets while increases the area they cover


I'd imagine the trick would be preserving the normals as the multiple objects move.........

Is there any leftover code from when turrets were on the sides of ships?  (in the FS2 demo, IIRC)