Jump to content

Search the Community

Showing results for tags 'internalmodule'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements
    • Welcome Aboard
  • Kerbal Space Program 2
    • KSP2 Dev Updates
    • KSP2 Discussion
    • KSP2 Suggestions and Development Discussion
    • Challenges & Mission Ideas
    • The KSP2 Spacecraft Exchange
    • Mission Reports
    • KSP2 Prelaunch Archive
  • Kerbal Space Program 2 Gameplay & Technical Support
    • KSP2 Gameplay Questions and Tutorials
    • KSP2 Technical Support (PC, unmodded installs)
    • KSP2 Technical Support (PC, modded installs)
  • Kerbal Space Program 2 Mods
    • KSP2 Mod Discussions
    • KSP2 Mod Releases
    • KSP2 Mod Development
  • Kerbal Space Program 1
    • KSP1 The Daily Kerbal
    • KSP1 Discussion
    • KSP1 Suggestions & Development Discussion
    • KSP1 Challenges & Mission ideas
    • KSP1 The Spacecraft Exchange
    • KSP1 Mission Reports
    • KSP1 Gameplay and Technical Support
    • KSP1 Mods
    • KSP1 Expansions
  • Community
    • Science & Spaceflight
    • Kerbal Network
    • The Lounge
    • KSP Fan Works
  • International
    • International
  • KerbalEDU
    • KerbalEDU
    • KerbalEDU Website

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Skype


Twitter


About me


Location


Interests

Found 1 result

  1. Hello everyone, I have a question about IVA animation/rotation. Is it possible to rotate / animate the origin of an InternalModule through a KSPEvent tied to a PartModule? The reason why I'm asking this is one, I'm very new to plugin development (very ignorant about what's possible or not), and two, I don't want to waste time trying to solve the impossible since this is the only reason I have to learn plugin development. For context, let me explain what I'm attempting to do. The plugin I'm trying to write is a PartModule called ModuleCentrifuge. I would like to (ideally) define a KSPField public integer called rotationalVelocity which defines the speed of rotation for the centrifuge animation. It is important that the craft be rotated through animation in a non-physical manner, to avoid physics calculations. A animation is then defined which rotates the part along the y axis (up / down in the VAB) as well as an expected attached internal space Another KSPField public float called ecRate defines the amount of electric charge consumed when the centrifuge rotates. Two KSPEvents are defined which are called "Start Centrifuge" and "Stop Centrifuge" which starts or stops the rotation of both the PartModule and InternalModule The impetus for creating this plugin, is to facilitate proper window view orientation in rotating centrifuge habitat IVAs. Any help / clarity / advice would be very much appreciated! EDIT: After teaching myself enough about both c# and the KSP plugin API, I have determined that, yes, everything I wanted to achieve is possible. Instead of rotational velocity I used rotational degrees per second (well, actually rotations per minute divided by 60). instead of two separate KSPEvents I use one to toggle between start and stop states utilizing Events["nameOfEvent"].guiName = "newGuiName" rotating the external model is accomplished by accessing the parent Part class, part.FindModelTransform(name of transform), assigning the found transform to a variable and then using Transform.Rotate(0, angle, 0) rotating the internalModel is accomplished by accessing the parent Part class child object internalModel which has the same method of FindModelTransform, so part.internalModel.FindModelTransform both the external model and internal model are accessible from within the partModule class, so there's no need to mess around with making a separate instance of internalModel.
×
×
  • Create New...