Class
RocketPropulsion
Deprecated
Applies a force so that an assembly follows and faces a target part.
Deprecated. This object is deprecated and should not be used for new work. Use
LineForce instead, and see the
legacy conversion notes.
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.
Properties 11#
CartoonFactorfloat | Determines the tendency of the assembly to face the
Target.ReadSafe |
MaxSpeedfloat | Determines the maximum speed at which the assembly will move toward the
Target.ReadSafe |
MaxThrustfloat | Determines the maximum amount of thrust that will be exerted to move the assembly.ReadSafe |
MaxTorqueVector3 | Determines the maximum amount of torque that may be exerted to rotate the
assembly towards the Target.ReadSafe |
TargetBasePart | Determines the object towards which the assembly should follow/face.ReadSafe |
TargetOffsetVector3 | Determines the world offset from the
Target toward which the force/torque is
exerted.ReadSafe |
TargetRadiusfloat | Determines the maximum distance from the
Target at which the assembly must be in
order for ReachedTarget to be
fired.ReadSafe |
ThrustDfloat | Determines the dampening applied to the assembly in order to prevent it
from overshooting the Target.ReadSafe |
ThrustPfloat | Determines how aggressive of a force is applied in reaching the
Target.ReadSafe |
TurnDfloat | Determines the amount of dampening that to use in reaching the
Target.ReadSafe |
TurnPfloat | Determines how aggressive of a torque is applied in facing the
Target.ReadSafe |
CartoonFactor: float#
ReadSafe
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: float#
ReadSafe
This property determines the upper limit of the velocity at which the
assembly will move toward the Target.
MaxThrust: float#
ReadSafe
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: Vector3#
ReadSafe
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: BasePart#
ReadSafe
This property determines the object towards which the RocketPropulsion
will exert force/torque. If set to nil, the
TargetOffset will be used instead.
TargetOffset: Vector3#
ReadSafe
TargetRadius: float#
ReadSafe
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: float#
ReadSafe
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: float#
ReadSafe
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: float#
ReadSafe
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: float#
ReadSafe
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 3#
| Abort | Causes the assembly to stop moving toward its
Target. |
| Fire | Causes the assembly to start moving toward its
Target. |
| fire | Deprecated |
Abort(): ()#
Causes the assembly to stop moving toward its
Target.
Returns
()
Fire(): ()#
Causes the assembly to start moving toward its
Target.
Returns
()
fire(): ()#
DeprecatedDeprecated
Deprecated. This function is a deprecated variant of RocketPropulsion:Fire()
which should be used instead.
Returns
()
Events 1#
| ReachedTarget | Fires when the assembly comes within
TargetRadius of the
Target. |
ReachedTarget()#
Fires when the assembly comes within
TargetRadius of the
Target.
Inherited members#
Inherited from Instance 58
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild