Show / Hide Table of Contents

Class ProjectileMovementComponent

ProjectileMovementComponent updates the position of another component during its tick.

Inheritance
System.Object
UObject
ActorComponent
MovementComponent
ProjectileMovementComponent
Inherited Members
MovementComponent.ConstrainDirectionToPlane(Vector)
MovementComponent.ConstrainLocationToPlane(Vector)
MovementComponent.ConstrainNormalToPlane(Vector)
MovementComponent.GetGravityZ()
MovementComponent.GetMaxSpeed()
MovementComponent.GetPhysicsVolume()
MovementComponent.GetPlaneConstraintAxisSetting()
MovementComponent.GetPlaneConstraintNormal(Vector)
MovementComponent.GetPlaneConstraintOrigin(Vector)
MovementComponent.IsExceedingMaxSpeed(Single)
MovementComponent.K2_GetMaxSpeedModifier()
MovementComponent.K2_GetModifiedMaxSpeed()
MovementComponent.K2_MoveUpdatedComponent(Vector, Rotator, Boolean, Boolean)
MovementComponent.SetPlaneConstraintAxisSetting(EPlaneConstraintAxisSetting)
MovementComponent.SetPlaneConstraintEnabled(Boolean)
MovementComponent.SetPlaneConstraintFromVectors(Vector, Vector)
MovementComponent.SetPlaneConstraintNormal(Vector)
MovementComponent.SetPlaneConstraintOrigin(Vector)
MovementComponent.SetUpdatedComponent(SceneComponent)
MovementComponent.SnapUpdatedComponentToPlane()
MovementComponent.StopMovementImmediately()
MovementComponent.UpdatedComponent
MovementComponent.UpdatedPrimitive
MovementComponent.Velocity
MovementComponent.PlaneConstraintNormal
MovementComponent.PlaneConstraintOrigin
MovementComponent.bUpdateOnlyIfRendered
MovementComponent.bAutoUpdateTickRegistration
MovementComponent.bTickBeforeOwner
MovementComponent.bAutoRegisterUpdatedComponent
MovementComponent.bConstrainToPlane
MovementComponent.bSnapToPlaneAtStart
MovementComponent.bAutoRegisterPhysicsVolumeUpdates
MovementComponent.bComponentShouldUpdatePhysicsVolume
ActorComponent.RegisterComponent()
ActorComponent.UnregisterComponent()
ActorComponent.ReceiveBeginPlay
ActorComponent.ReceiveEndPlay
ActorComponent.ReceiveTick
ActorComponent.Activate(Boolean)
ActorComponent.AddTickPrerequisiteActor(Actor)
ActorComponent.AddTickPrerequisiteComponent(ActorComponent)
ActorComponent.ComponentHasTag(Name)
ActorComponent.Deactivate()
ActorComponent.GetComponentTickInterval()
ActorComponent.GetOwner()
ActorComponent.IsActive()
ActorComponent.IsBeingDestroyed()
ActorComponent.IsComponentTickEnabled()
ActorComponent.K2_DestroyComponent(UObject)
ActorComponent.RemoveTickPrerequisiteActor(Actor)
ActorComponent.RemoveTickPrerequisiteComponent(ActorComponent)
ActorComponent.SetActive(Boolean, Boolean)
ActorComponent.SetAutoActivate(Boolean)
ActorComponent.SetComponentTickEnabled(Boolean)
ActorComponent.SetComponentTickInterval(Single)
ActorComponent.SetIsReplicated(Boolean)
ActorComponent.SetTickableWhenPaused(Boolean)
ActorComponent.SetTickGroup(Byte)
ActorComponent.ToggleActive()
ActorComponent.PrimaryComponentTick
ActorComponent.AssetUserData
ActorComponent.bReplicates
ActorComponent.bNetAddressable
ActorComponent.bAutoActivate
ActorComponent.bIsActive
ActorComponent.bEditableWhenInherited
ActorComponent.bCanEverAffectNavigation
ActorComponent.bIsEditorOnly
ActorComponent.bIsVisualizationComponent
UObject.TransientPackage
UObject.CastTo<T>(UObject)
UObject.CastTo(UObject, Type)
UObject.RemoveObject(UObject)
UObject.MakeObjectArrayField<T>(NativeArray*)
UObject.NotImplemented<T>()
UObject.Construct()
UObject.GetHashCode()
UObject.GetName()
UObject.ToString()
UObject.Name
UObject._None
UObject.None
UObject.ObjPointer
UObject.LoadObjectFromClass(Class, UObject, String, String, LoadFlags, PackageMap, Boolean)
UObject.LoadClass(Class, UObject, String, String, LoadFlags, PackageMap)
UObject.GetPropertyFor<T>(Name)
UObject.ExecuteUbergraph
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: UE4.Engine
Assembly: UE4DotNet.dll
Syntax
public class ProjectileMovementComponent : MovementComponent
Remarks

Behavior such as bouncing after impacts and homing toward a target are supported.

Normally the root component of the owning actor is moved, however another component may be selected (see SetUpdatedComponent()). If the updated component is simulating physics, only the initial launch parameters (when initial velocity is non-zero) will affect the projectile, and the physics sim will take over from there.

@see UMovementComponent

Properties

| Improve this Doc View Source

bBounceAngleAffectsFriction

Declaration
public bool bBounceAngleAffectsFriction { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bForceSubStepping

Declaration
public bool bForceSubStepping { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bInitialVelocityInLocalSpace

Declaration
public bool bInitialVelocityInLocalSpace { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bInterpMovement

Declaration
public bool bInterpMovement { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bInterpRotation

Declaration
public bool bInterpRotation { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bIsHomingProjectile

Declaration
public bool bIsHomingProjectile { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bIsSliding

Declaration
public bool bIsSliding { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

BounceAdditionalIterations

On the first few bounces (up to this amount), allow extra iterations over MaxSimulationIterations if necessary.

Declaration
public int BounceAdditionalIterations { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

BounceVelocityStopSimulatingThreshold

If velocity is below this threshold after a bounce, stops simulating and triggers the OnProjectileStop event.

Declaration
public float BounceVelocityStopSimulatingThreshold { get; set; }
Property Value
Type Description
System.Single
Remarks

Ignored if bShouldBounce is false, in which case the projectile stops simulating on the first impact. @see StopSimulating(), OnProjectileStop

| Improve this Doc View Source

Bounciness

Percentage of velocity maintained after the bounce in the direction of the normal of impact (coefficient of restitution).

Declaration
public float Bounciness { get; set; }
Property Value
Type Description
System.Single
Remarks

1.0 = no velocity lost, 0.0 = no bounce. Ignored if bShouldBounce is false.

| Improve this Doc View Source

bRotationFollowsVelocity

Declaration
public bool bRotationFollowsVelocity { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bShouldBounce

Declaration
public bool bShouldBounce { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bSimulationEnabled

Declaration
public bool bSimulationEnabled { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bSweepCollision

Declaration
public bool bSweepCollision { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

Buoyancy

Buoyancy of UpdatedComponent in fluid. 0.0=sinks as fast as in air, 1.0=neutral buoyancy

Declaration
public float Buoyancy { get; set; }
Property Value
Type Description
System.Single
| Improve this Doc View Source

DefaultObject

Get UE4 Default Object for this Class

Declaration
public static ProjectileMovementComponent DefaultObject { get; }
Property Value
Type Description
ProjectileMovementComponent
| Improve this Doc View Source

Friction

Coefficient of friction, affecting the resistance to sliding along a surface.

Declaration
public float Friction { get; set; }
Property Value
Type Description
System.Single
Remarks

Normal range is [0,1] : 0.0 = no friction, 1.0+ = very high friction. Also affects the percentage of velocity maintained after the bounce in the direction tangent to the normal of impact. Ignored if bShouldBounce is false. @see bBounceAngleAffectsFriction

| Improve this Doc View Source

HomingAccelerationMagnitude

The magnitude of our acceleration towards the homing target. Overall velocity magnitude will still be limited by MaxSpeed.

Declaration
public float HomingAccelerationMagnitude { get; set; }
Property Value
Type Description
System.Single
| Improve this Doc View Source

InitialSpeed

Initial speed of projectile. If greater than zero, this will override the initial Velocity value and instead treat Velocity as a direction.

Declaration
public float InitialSpeed { get; set; }
Property Value
Type Description
System.Single
| Improve this Doc View Source

InterpLocationMaxLagDistance

Max distance behind UpdatedComponent which the interpolated component is allowed to lag.

Declaration
public float InterpLocationMaxLagDistance { get; set; }
Property Value
Type Description
System.Single
| Improve this Doc View Source

InterpLocationSnapToTargetDistance

Max distance behind UpdatedComponent beyond which the interpolated component is snapped to the target location instead.

Declaration
public float InterpLocationSnapToTargetDistance { get; set; }
Property Value
Type Description
System.Single
Remarks

For instance if the target teleports this far beyond the interpolated component, the interpolation is snapped to match the target.

| Improve this Doc View Source

InterpLocationTime

"Time" over which most of the location interpolation occurs, when the UpdatedComponent (target) moves ahead of the interpolated component.

Declaration
public float InterpLocationTime { get; set; }
Property Value
Type Description
System.Single
Remarks

Since the implementation uses exponential lagged smoothing, this is a rough time value and experimentation should inform a final result. A value of zero is effectively instantaneous interpolation.

| Improve this Doc View Source

InterpRotationTime

"Time" over which most of the rotation interpolation occurs, when the UpdatedComponent (target) moves ahead of the interpolated component.

Declaration
public float InterpRotationTime { get; set; }
Property Value
Type Description
System.Single
Remarks

Since the implementation uses exponential lagged smoothing, this is a rough time value and experimentation should inform a final result. A value of zero is effectively instantaneous interpolation.

| Improve this Doc View Source

MaxSimulationIterations

Max number of iterations used for each discrete simulation step.

Declaration
public int MaxSimulationIterations { get; set; }
Property Value
Type Description
System.Int32
Remarks

Increasing this value can address precision issues with fast-moving objects or complex collision scenarios, at the cost of performance.

WARNING: if (MaxSimulationTimeStep * MaxSimulationIterations) is too low for the min framerate, the last simulation step may exceed MaxSimulationTimeStep to complete the simulation. @see MaxSimulationTimeStep, bForceSubStepping

| Improve this Doc View Source

MaxSimulationTimeStep

Max time delta for each discrete simulation step.

Declaration
public float MaxSimulationTimeStep { get; set; }
Property Value
Type Description
System.Single
Remarks

Lowering this value can address precision issues with fast-moving objects or complex collision scenarios, at the cost of performance.

WARNING: if (MaxSimulationTimeStep * MaxSimulationIterations) is too low for the min framerate, the last simulation step may exceed MaxSimulationTimeStep to complete the simulation. @see MaxSimulationIterations, bForceSubStepping

| Improve this Doc View Source

MaxSpeed

Limit on speed of projectile (0 means no limit).

Declaration
public float MaxSpeed { get; set; }
Property Value
Type Description
System.Single
| Improve this Doc View Source

MinFrictionFraction

When bounce angle affects friction, apply at least this fraction of normal friction.

Declaration
public float MinFrictionFraction { get; set; }
Property Value
Type Description
System.Single
Remarks

Helps consistently slow objects sliding or rolling along surfaces or in valleys when the usual friction amount would take a very long time to settle.

| Improve this Doc View Source

PreviousHitNormal

Saved HitResult Normal from previous simulation step that resulted in an impact. If PreviousHitTime is 1.0, then the hit was not in the last step.

Declaration
public Vector PreviousHitNormal { get; }
Property Value
Type Description
Vector
| Improve this Doc View Source

PreviousHitTime

Saved HitResult Time (0 to 1) from previous simulation step. Equal to 1.0 when there was no impact.

Declaration
public float PreviousHitTime { get; }
Property Value
Type Description
System.Single
| Improve this Doc View Source

ProjectileGravityScale

Custom gravity scale for this projectile. Set to 0 for no gravity.

Declaration
public float ProjectileGravityScale { get; set; }
Property Value
Type Description
System.Single
| Improve this Doc View Source

StaticClass

Get UE4 Class

Declaration
public static Class StaticClass { get; }
Property Value
Type Description
Class

Methods

| Improve this Doc View Source

IsInterpolationComplete()

Returns whether interpolation is complete because the target has been reached. True when interpolation is disabled.

Declaration
public bool IsInterpolationComplete()
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsVelocityUnderSimulationThreshold()

Returns true if velocity magnitude is less than BounceVelocityStopSimulatingThreshold.

Declaration
public bool IsVelocityUnderSimulationThreshold()
Returns
Type Description
System.Boolean
| Improve this Doc View Source

LimitVelocity(Vector)

Don't allow velocity magnitude to exceed MaxSpeed, if MaxSpeed is non-zero.

Declaration
public Vector LimitVelocity(Vector NewVelocity)
Parameters
Type Name Description
Vector NewVelocity
Returns
Type Description
Vector
| Improve this Doc View Source

MoveInterpolationTarget(Vector, Rotator)

Moves the UpdatedComponent, which is also the interpolation target for the interpolated component.

Declaration
public void MoveInterpolationTarget(Vector NewLocation, Rotator NewRotation)
Parameters
Type Name Description
Vector NewLocation
Rotator NewRotation
Remarks

If there is not interpolated component, this simply moves UpdatedComponent. Use this typically from PostNetReceiveLocationAndRotation() or similar from an Actor.

| Improve this Doc View Source

New(UObject, Name)

Spawn an object of this class

Declaration
public static ProjectileMovementComponent New(UObject obj = null, Name name = default(Name))
Parameters
Type Name Description
UObject obj
Name name
Returns
Type Description
ProjectileMovementComponent
| Improve this Doc View Source

ResetInterpolation()

Resets interpolation so that interpolated component snaps back to the initial location/rotation without any additional offsets.

Declaration
public void ResetInterpolation()
| Improve this Doc View Source

SetInterpolatedComponent(SceneComponent)

Assigns the component that will be used for network interpolation/smoothing.

Declaration
public void SetInterpolatedComponent(SceneComponent Component)
Parameters
Type Name Description
SceneComponent Component
Remarks

It is expected that this is a component attached somewhere below the UpdatedComponent. When network updates use MoveInterpolationTarget() to move the UpdatedComponent, the interpolated component's relative offset will be maintained and smoothed over the course of future component ticks. The current relative location and rotation of the component is saved as the target offset for future interpolation. @see MoveInterpolationTarget(), bInterpMovement, bInterpRotation

| Improve this Doc View Source

SetVelocityInLocalSpace(Vector)

Sets the velocity to the new value, rotated into Actor space.

Declaration
public void SetVelocityInLocalSpace(Vector NewVelocity)
Parameters
Type Name Description
Vector NewVelocity
| Improve this Doc View Source

StopSimulating(HitResult)

Clears the reference to UpdatedComponent, fires stop event (OnProjectileStop), and stops ticking (if bAutoUpdateTickRegistration is true).

Declaration
public void StopSimulating(HitResult HitResult)
Parameters
Type Name Description
HitResult HitResult

Operators

| Improve this Doc View Source

Implicit(IntPtr to ProjectileMovementComponent)

Convert from IntPtr to UObject

Declaration
public static implicit operator ProjectileMovementComponent(IntPtr p)
Parameters
Type Name Description
System.IntPtr p
Returns
Type Description
ProjectileMovementComponent
  • Improve this Doc
  • View Source
Back to top Generated by DocFX