Jump to content

Help needed with HL Airship Plugin


Recommended Posts

I'm needing somebody that can teach me some C# as well as upkeep the plugins for Hooligan Labs mods until such time as I can do it myself.

That said I am wondering how hard it would be, or if it is even possible, to code a plugin to 'fake' a single part to have two lift sources.

Link to comment
Share on other sites

It should be possible to have two perfectly real lift sources. From a cursory glance at the source of HL Airships, it adds force to things by this.part.Rigidbody.AddForceAtPosition(buoyantForce, part.rigidbody.worldCenterOfMass, ForceMode.Force);

I.e. it applies force to the part itself at it's local center of mass. According to Unity documentation, position doesn't even have to be within the surface of the rigidbody, it just will look unrealistic if it isn't. There's nothing saying you can't apply force more than once either.

Add a transform to the model, figure out how much force and where do you need, and part.Rigidbody.AddForceAtPosition(buoyantForce, thattransform.position, ForceMode.Force); ?

Link to comment
Share on other sites

It should be possible to have two perfectly real lift sources. From a cursory glance at the source of HL Airships, it adds force to things by this.part.Rigidbody.AddForceAtPosition(buoyantForce, part.rigidbody.worldCenterOfMass, ForceMode.Force);

I.e. it applies force to the part itself at it's local center of mass. According to Unity documentation, position doesn't even have to be within the surface of the rigidbody, it just will look unrealistic if it isn't. There's nothing saying you can't apply force more than once either.

Add a transform to the model, figure out how much force and where do you need, and part.Rigidbody.AddForceAtPosition(buoyantForce, thattransform.position, ForceMode.Force); ?

I will certainly have ro take a shot at that and see if i can't pull it off.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...