Jump to content

[Plugin, 0.19.1] AdvAeronautics - fancyfying PartModules for your engines


JDP

Recommended Posts

[Plugin, 0.19.1] AdvAeronautics - fancyfying PartModules for your engines

Download:

.dll and source here.

(you are free to use and modify this plugin as long as the original aouthor is credited.

Derivatives of this plugin and content using this plugin must be hosted on Kerbalspaceport.com in case of public release except with the explicite dispensation from the original author)

While developing the AeroProbe for RemoteTech I made a couple of PartModules to make the engines look cooler. I've decided to release an updated version of these PartModules as a small standalone plugin in case some of you would like the same features on your engines.

This plugin contains two PartModules:

  • ModuleAaEngineAnimator. manages a looped animation and adjusts animation speed according to engine throttle. I used this to make an animated intake with a fan that spins faster as the engine revs faster.
  • ModuleAaGimbal. Works just like the stock ModuleGimbal we all know and love, except it animates the gimbal objects along their own pivots in a much more complex way that you'd get if you just parented them to the gimbalTransform

If you want to see these PartModules in action, take a look at the wing part that comes with the RemoteTech AeroProbe, it uses them both, albeit under different names within the RemoteTech NameSpace.

How to implement the modules

ModuleAaEngineAnimator

Here are all the variables you can set in the cfg file, and their default value:


MODULE
{
name = ModuleAaEngineAnimator

//Name of the looped animation clip the module should play
Animation =

//speed of the clip when throttle is 0
Speed0 = 1

//speed of the clip when throttle is 1
Speed1 = 1

//if there are other animation clips used in the part, set this to true. It will then reorder any animation clips into different layers making it possible to play and stop one without affecting the others.
fixAnimLayers = false
}

It's important to note that this module only manages an animation, you'll need a ModuleEngines on the part as well.

ModuleAaGimbal

This PartModule should replace ModuleGimbal. It is a subclass of ModuleGimbal and hence inherits its variables. There are however a couple of variables unique to ModuleAaGimbal. Here they are:


MODULE
{
name = ModuleAaGimbal

//these are the names of the transforms used in the calculation
FinPivotName =
FinTipName =
FinAnchorName =
}

In short, what the PartModule does is rotate the FinPivot so that the FinTip has a constant distance to the FinAnchor. The FinAnchor is just an empty transform and should be a child of the thrustTransform so it moves when the module rotates the thrustTransform. Here is a tutorial on how to set everything up:

In my engine I used the RemoteTech equivalent of ModuleAaGimbal to animate 3 simple fins, but this PartModule could potentially be used to animate many interlocking fins, creating much more complex and awesome gimballing animations looking much like real-world thrust vectoring jet engines.

I hope you find use for these PartModules. Especially if that use is creating pure awesome :D

Cheers

-JDP

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...