RocketPropulsion

Show Deprecated
Deprecated

The RocketPropulsion object applies force on an assembly so that it both follows and faces a target. It acts like a hybrid of BodyPosition and BodyGyro. Unlike other BodyMovers, RocketPropulsion must be instructed to begin applying or stopping force via Fire() or Abort() respectively.

You can detect when the assembly reaches its target using the ReachedTarget event which fires once the assembly is within the TargetRadius of the Target part.

Summary

Properties

  • Read Parallel

    Determines the tendency of the assembly to face the Target.

  • Read Parallel

    Determines the maximum speed at which the assembly will move toward the Target.

  • Read Parallel

    Determines the maximum amount of thrust that will be exerted to move the assembly.

  • Read Parallel

    Determines the maximum amount of torque that may be exerted to rotate the assembly towards the Target.

  • Read Parallel

    Determines the object towards which the assembly should follow/face.

  • Read Parallel

    Determines the world offset from the Target toward which the force/torque is exerted.

  • Read Parallel

    Determines the maximum distance from the Target at which the assembly must be in order for ReachedTarget to be fired.

  • Read Parallel

    Determines the dampening applied to the assembly in order to prevent it from overshooting the Target.

  • Read Parallel

    Determines how aggressive of a force is applied in reaching the Target.

  • Read Parallel

    Determines the amount of dampening that to use in reaching the Target.

  • Read Parallel

    Determines how aggressive of a torque is applied in facing the Target.

Methods

  • Abort():()

    Causes the assembly to stop moving toward its Target.

  • Fire():()

    Causes the assembly to start moving toward its Target.

Properties

CartoonFactor

Read Parallel

This property determines the tendency of the assembly to face the Target. By default, this property is set to 0.7. If set to 0, the assembly will make no effort to face the target.

MaxSpeed

Read Parallel

This property determines the upper limit of the velocity at which the assembly will move toward the Target.

MaxThrust

Read Parallel

This property determines the upper limit of the thrust that may be exerted to move the assembly. Assemblies that have high mass will require more thrust in order to remain airborne and thus track the Target.

MaxTorque

Read Parallel

This property determines the upper limit on the amount of torque that may be exerted in order to rotate the assembly towards the Target. It functions similarly to BodyGyro.MaxTorque.

Target

Read Parallel

This property determines the object towards which the RocketPropulsion will exert force/torque. If set to nil, the TargetOffset will be used instead.

TargetOffset

Read Parallel

This property determines the world offset from the Target. It is especially useful when Target is set to nil, since this property then acts as the target position.

TargetRadius

Read Parallel

This property determines the maximum distance from the Target at which the assembly must be in order for ReachedTarget to be fired. It does not affect the exerted forces in any way.

ThrustD

Read Parallel

This property is used to dampen the velocity of the assembly in order to prevent it from overshooting the Target and causing a "rubber‑banding" effect. It behaves similarly to BodyPosition.D.

ThrustP

Read Parallel

This property determines how much power is used while applying force in order to reach the Target position. The higher this value, the more power will be used and the faster it will be used. This property works similarly to BodyPosition.P.

TurnD

Read Parallel

This property specifies how much dampening will be applied to the torque used to face the Target. When the assembly approaches the goal orientation, it needs to decelerate, otherwise it will rotate past the goal and have to stop and re-accelerate back toward the goal. This often creates an undesirable "rubber‑banding" effect, avoided by applying dampening. The higher this value is set, the greater the dampening curve becomes, or the slower the part will approach the goal orientation.

TurnP

Read Parallel

This property determines how much power is used while applying torque in order to face the Target. The higher this value, the more power will be used and the faster it will be used.

Methods

Abort

()

Causes the assembly to stop moving toward its Target.


Returns

()

Fire

()

Causes the assembly to start moving toward its Target.


Returns

()

Events

ReachedTarget

Fires when the assembly comes within TargetRadius of the Target.