Jump to content

Helicopter rotor and the KSP API


Recommended Posts

Hi all,

 

this is my first mod, please be gentle! I'm not happy with the Firespitter/KAX helicopter parts so I decided to write my own. So far I have managed to model and animate a main rotor. Importing it to Unity seems pretty straightforward. However I need help with the cfg referencing. I assume I use KPS's own ModuleEngine to generate thrust. How do I set the vector of the engine (so it points upwards)? I noticed that the Firespitter/KAX config files use the reaction wheel (ModuleReactionWheel) to steer the helicopter. Can't I use gimbal instead? Any help would be appreciated!

Link to comment
Share on other sites

You can do what ever you want! I think this is the awesomeness of KSP:cool:

Just a little hint, since KSP ModuleEngine/ModuleEngineFX doesn't provide any torque during the rotary, we could consider they are using a NOTAR system to counter the torque, which make the " ModuleReactionWheel" quite reasonable.

Also, you can add gimbal at the same time, they could be considered as the hinge on the rotor.

Wish you best luck.

Link to comment
Share on other sites

Firespitter/KAX uses the stock engine module and it seems to work okay-ish, though there is no collective pitch. Why the doubt, Sarbian? I considered writing my own plugin but right now I just want a simple, stock based part to start with.

Link to comment
Share on other sites

6 hours ago, flywlyx said:

You can do what ever you want! I think this is the awesomeness of KSP:cool:

Just a little hint, since KSP ModuleEngine/ModuleEngineFX doesn't provide any torque during the rotary, we could consider they are using a NOTAR system to counter the torque, which make the " ModuleReactionWheel" quite reasonable.

Also, you can add gimbal at the same time, they could be considered as the hinge on the rotor.

Wish you best luck.

Your enthusiasm means the world to me. Thanks!

Link to comment
Share on other sites

20 hours ago, alkopop79 said:

How do I set the vector of the engine (so it points upwards)?

Have you seen this page? Lots of useful links. Part way down the page there's an Engine section and (at least) one shows the transform orientation.

Edited by wasml
Link to comment
Share on other sites

On 4/25/2016 at 11:21 PM, alkopop79 said:

Hi all,

 

this is my first mod, please be gentle! I'm not happy with the Firespitter/KAX helicopter parts so I decided to write my own. So far I have managed to model and animate a main rotor. Importing it to Unity seems pretty straightforward. However I need help with the cfg referencing. I assume I use KPS's own ModuleEngine to generate thrust. How do I set the vector of the engine (so it points upwards)? I noticed that the Firespitter/KAX config files use the reaction wheel (ModuleReactionWheel) to steer the helicopter. Can't I use gimbal instead? Any help would be appreciated!

Your thrustTransform's Z+ axis is what KSP uses to identify where to impart force.

So your Z axis would need to be pointed towards the base of your rotor. I just don't know if that would work since you would be thrusting into your other components. (think of a jet engine set on top of an airplane pointing down, doesn't make much sense, does it?)

Link to comment
Share on other sites

Another approach is to create a true rotor spindle (controlled by throttle) and surface attachable blades, essentially control surfaces with their range of motion (now tweakable in 1.1) determining collective. It'll also introduce torque, so fun to be had cancelling that out. Hard-mode rotors, basically.

Link to comment
Share on other sites

1 hour ago, martinezfg11 said:

Your thrustTransform's Z+ axis is what KSP uses to identify where to impart force.

So your Z axis would need to be pointed towards the base of your rotor. I just don't know if that would work since you would be thrusting into your other components. (think of a jet engine set on top of an airplane pointing down, doesn't make much sense, does it?)

Makes sense, thank you. What are the API modules for thrust vectoring by the way? 

Link to comment
Share on other sites

11 minutes ago, alkopop79 said:

Makes sense, thank you. What are the API modules for thrust vectoring by the way? 

You mean in the PartModules? That would be ModuleGimbal, you can look at some of Squad's engines for a clue on what values to put in. 

Your gimbal transform can be the same thrustTransform. Plus you can assign parts as children of your gimbal so that they move with the gimbal as well.

I'd use something like gimbalTranform>Mesh>thrustTransform.

Edited by martinezfg11
Clarification (maybe)
Link to comment
Share on other sites

12 minutes ago, alkopop79 said:

Makes sense, thank you. What are the API modules for thrust vectoring by the way? 

Found it in the config file of J-404 engine: 

MODULE
    {
        name = ModuleGimbal
        gimbalTransformName = Gimbal
        gimbalRange = 10
         gimbalResponseSpeed = 8
         useGimbalResponseSpeed = true
    }

 

5 minutes ago, martinezfg11 said:

You mean in the PartModules? That would be ModuleGimbal, you can look at some of Squad's engines for a clue on what values to put in. 

Your gimbal transform can be the same thrustTransform. Plus you can assign parts as children of your gimbal so that they move with the gimbal as well.

I'd use something like gimbalTranform>Mesh>thrustTransform.

Excellent, thank you martinezfg11!

Link to comment
Share on other sites

Don't forget  "ModuleSurfaceFX"

Quote

    MODULE
    {
        name = ModuleSurfaceFX
        thrustProviderModuleIndex = 0
        fxMax = 0.5
        maxDistance = 20
        falloff = 2
        thrustTransformName = thrustTransform
    }

It create the ashes blow up by the engine.

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