Click or drag to resize

IsPhysicalObject Interface

Interface for the modules that need handling physics.

Namespace:  KSPDev.KSPInterfaces
Assembly:  KSPDev_Utils.2.0 (in KSPDev_Utils.2.0.dll) Version: 2.0 for KSP v1.8+
Syntax
C#
public interface IsPhysicalObject
Request Example View Source

The IsPhysicalObject type exposes the following members.

Methods
  NameDescription
Public methodFixedUpdate
Notifies that the fixed rate frame is being handled.
Top
Remarks
The events of this interface are triggered by the Unity engine via reflections. It's not required for the module to implement the interface to be notified, but by implementing it, the code becomes more consistent and less error prone.
Examples
public class MyModule : PartModule, IsPhysicalObject {
  /// <inheritdoc/>
  public void FixedUpdate() {
    // Do the physics stuff.
  }
}
See Also