|
G1R AngelScript
Scripting reference for the Gothic 1 Remake
|
ProjectileMovementComponent updates the position of another component during its tick. More...
Public Member Functions | |
Game|Components|ProjectileMovement | |
| FVector | LimitVelocity (FVector NewVelocity) const |
| Don't allow velocity magnitude to exceed MaxSpeed, if MaxSpeed is non-zero. | |
| void | StopSimulating (FHitResult HitResult) |
| Clears the reference to UpdatedComponent, fires stop event (OnProjectileStop), and stops ticking (if bAutoUpdateTickRegistration is true). | |
| bool | IsVelocityUnderSimulationThreshold () const |
| Returns true if velocity magnitude is less than BounceVelocityStopSimulatingThreshold. | |
| void | SetVelocityInLocalSpace (FVector NewVelocity) |
| Sets the velocity to the new value, rotated into Actor space. | |
Game|Components|ProjectileMovement|Interpolation | |
| void | MoveInterpolationTarget (FVector NewLocation, FRotator NewRotation) |
| Moves the UpdatedComponent, which is also the interpolation target for the interpolated component. If there is not interpolated component, this simply moves UpdatedComponent. Use this typically from PostNetReceiveLocationAndRotation() or similar from an Actor. | |
| void | ResetInterpolation () |
| Resets interpolation so that interpolated component snaps back to the initial location/rotation without any additional offsets. | |
| void | SetInterpolatedComponent (USceneComponent Component) |
| Assigns the component that will be used for network interpolation/smoothing. 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. | |
| bool | IsInterpolationComplete () const |
| Returns whether interpolation is complete because the target has been reached. True when interpolation is disabled. | |
Functions | |
| void | SetHomingTargetComponent (USceneComponent HomingTargetComponent) |
| void | SetbSimulationEnabled (bool Value) |
| If true, does normal simulation ticking and update. If false, simulation is halted, but component will still tick (allowing interpolation to run). | |
| void | SetMaxSpeed (const float32 &Value) |
| Limit on speed of projectile (0 means no limit). | |
| bool | GetbRotationFollowsVelocity () const |
| If true, this projectile will have its rotation updated each frame to match the direction of its velocity. | |
| void | SetbRotationFollowsVelocity (bool Value) |
| If true, this projectile will have its rotation updated each frame to match the direction of its velocity. | |
| bool | GetbRotationRemainsVertical () const |
| If true, this projectile will have its rotation updated each frame to maintain the rotations Yaw only. (bRotationFollowsVelocity is required to be true). | |
| void | SetbRotationRemainsVertical (bool Value) |
| If true, this projectile will have its rotation updated each frame to maintain the rotations Yaw only. (bRotationFollowsVelocity is required to be true). | |
| bool | GetbShouldBounce () const |
| If true, simple bounces will be simulated. Set this to false to stop simulating on contact. | |
| void | SetbShouldBounce (bool Value) |
| If true, simple bounces will be simulated. Set this to false to stop simulating on contact. | |
| bool | GetbInitialVelocityInLocalSpace () const |
| If true, the initial Velocity is interpreted as being in local space upon startup. See: SetVelocityInLocalSpace(). | |
| void | SetbInitialVelocityInLocalSpace (bool Value) |
| If true, the initial Velocity is interpreted as being in local space upon startup. See: SetVelocityInLocalSpace(). | |
| bool | GetbForceSubStepping () const |
| If true, forces sub-stepping to break up movement into discrete smaller steps to improve accuracy of the trajectory. Objects that move in a straight line typically do not need to set this, as movement always uses continuous collision detection (sweeps) so collision is not missed. Sub-stepping is automatically enabled when under the effects of gravity or when homing towards a target. See: MaxSimulationTimeStep, MaxSimulationIterations. | |
| void | SetbForceSubStepping (bool Value) |
| If true, forces sub-stepping to break up movement into discrete smaller steps to improve accuracy of the trajectory. Objects that move in a straight line typically do not need to set this, as movement always uses continuous collision detection (sweeps) so collision is not missed. Sub-stepping is automatically enabled when under the effects of gravity or when homing towards a target. See: MaxSimulationTimeStep, MaxSimulationIterations. | |
| bool | GetbSimulationEnabled () const |
| If true, does normal simulation ticking and update. If false, simulation is halted, but component will still tick (allowing interpolation to run). | |
| const USceneComponent | GetHomingTargetComponent () const |
| bool | GetbSweepCollision () const |
| If true, movement uses swept collision checks. If false, collision effectively teleports to the destination. Note that when this is disabled, movement will never generate blocking collision hits (though overlaps will be updated). | |
| void | SetbSweepCollision (bool Value) |
| If true, movement uses swept collision checks. If false, collision effectively teleports to the destination. Note that when this is disabled, movement will never generate blocking collision hits (though overlaps will be updated). | |
| bool | GetbIsHomingProjectile () const |
| If true, we will accelerate toward our homing target. HomingTargetComponent must be set after the projectile is spawned. See: HomingTargetComponent, HomingAccelerationMagnitude. | |
| void | SetbIsHomingProjectile (bool Value) |
| If true, we will accelerate toward our homing target. HomingTargetComponent must be set after the projectile is spawned. See: HomingTargetComponent, HomingAccelerationMagnitude. | |
| bool | GetbBounceAngleAffectsFriction () const |
| Controls the effects of friction on velocity parallel to the impact surface when bouncing. If true, friction will be modified based on the angle of impact, making friction higher for perpendicular impacts and lower for glancing impacts. If false, a bounce will retain a proportion of tangential velocity equal to (1.0 - Friction), acting as a "horizontal restitution". | |
| void | SetbBounceAngleAffectsFriction (bool Value) |
| Controls the effects of friction on velocity parallel to the impact surface when bouncing. If true, friction will be modified based on the angle of impact, making friction higher for perpendicular impacts and lower for glancing impacts. If false, a bounce will retain a proportion of tangential velocity equal to (1.0 - Friction), acting as a "horizontal restitution". | |
| bool | GetbIsSliding () const |
| If true, projectile is sliding / rolling along a surface. | |
| bool | GetbInterpMovement () const |
| If true and there is an interpolated component set, location (and optionally rotation) interpolation is enabled which allows the interpolated object to smooth uneven updates of the UpdatedComponent's location (usually to smooth network updates). This requires using SetInterpolatedComponent() to indicate the visual component that lags behind the collision, and using MoveInterpolationTarget() when the new target location/rotation is received (usually on a net update). See: SetInterpolatedComponent(), MoveInterpolationTarget(). | |
| void | SetbInterpMovement (bool Value) |
| If true and there is an interpolated component set, location (and optionally rotation) interpolation is enabled which allows the interpolated object to smooth uneven updates of the UpdatedComponent's location (usually to smooth network updates). This requires using SetInterpolatedComponent() to indicate the visual component that lags behind the collision, and using MoveInterpolationTarget() when the new target location/rotation is received (usually on a net update). See: SetInterpolatedComponent(), MoveInterpolationTarget(). | |
| bool | GetbInterpRotation () const |
| If true and there is an interpolated component set, rotation interpolation is enabled which allows the interpolated object to smooth uneven updates of the UpdatedComponent's rotation (usually to smooth network updates). Rotation interpolation is only applied if bInterpMovement is also enabled. See: SetInterpolatedComponent(), MoveInterpolationTarget(). | |
| void | SetbInterpRotation (bool Value) |
| If true and there is an interpolated component set, rotation interpolation is enabled which allows the interpolated object to smooth uneven updates of the UpdatedComponent's rotation (usually to smooth network updates). Rotation interpolation is only applied if bInterpMovement is also enabled. See: SetInterpolatedComponent(), MoveInterpolationTarget(). | |
| bool | GetbThrottleInterpolation () const |
| If true, throttle interpolation when not relevant. See: ThrottleInterpolationSkipFramesNotRecent, ThrottleInterpolationSkipFramesRecent, ThrottleInterpolationThresholdNotRenderedShortTime, ThrottleInterpolationThresholdNotRenderedLongTime. | |
| void | SetbThrottleInterpolation (bool Value) |
| If true, throttle interpolation when not relevant. See: ThrottleInterpolationSkipFramesNotRecent, ThrottleInterpolationSkipFramesRecent, ThrottleInterpolationThresholdNotRenderedShortTime, ThrottleInterpolationThresholdNotRenderedLongTime. | |
| bool | GetbSimulationUseScopedMovement () const |
| If true, uses FScopedMovementUpdate to avoid moving the UpdatedComponent more than once during a tick during simulation. This also defers overlap updates and some impact events until after the simulation update completes, so it may delay important events and continue deflection, so use with caution. | |
| void | SetbSimulationUseScopedMovement (bool Value) |
| If true, uses FScopedMovementUpdate to avoid moving the UpdatedComponent more than once during a tick during simulation. This also defers overlap updates and some impact events until after the simulation update completes, so it may delay important events and continue deflection, so use with caution. | |
| bool | GetbInterpolationUseScopedMovement () const |
| If true, uses FScopedMovementUpdate to avoid moving the attached interpolated object's children more than once during a tick when it would both interpolate and move during projectile simulation. This also defers overlap updates for the interpolated object until after the simulation update completes. | |
| void | SetbInterpolationUseScopedMovement (bool Value) |
| If true, uses FScopedMovementUpdate to avoid moving the attached interpolated object's children more than once during a tick when it would both interpolate and move during projectile simulation. This also defers overlap updates for the interpolated object until after the simulation update completes. | |
| Public Member Functions inherited from UMovementComponent | |
| const FVector & | GetPlaneConstraintNormal () const |
| Returns the normal of the plane that constrains movement, enforced if the plane constraint is enabled. | |
| const FVector & | GetPlaneConstraintOrigin () const |
| Get the plane constraint origin. This defines the behavior of snapping a position to the plane, such as by SnapUpdatedComponentToPlane(). | |
| void | SetPlaneConstraintAxisSetting (EPlaneConstraintAxisSetting NewAxisSetting) |
| Set the plane constraint axis setting. Changing this setting will modify the current value of PlaneConstraintNormal. | |
| FVector | ConstrainNormalToPlane (FVector Normal) const |
| Constrain a normal vector (of unit length) to the plane constraint, if enabled. | |
| EPlaneConstraintAxisSetting | GetPlaneConstraintAxisSetting () const |
| Get the plane constraint axis setting. | |
| void | SetPlaneConstraintEnabled (bool bEnabled) |
| Sets whether or not the plane constraint is enabled. | |
| void | SetPlaneConstraintFromVectors (FVector Forward, FVector Up) |
| Uses the Forward and Up vectors to compute the plane that constrains movement, enforced if the plane constraint is enabled. | |
| void | SetPlaneConstraintNormal (FVector PlaneNormal) |
| Sets the normal of the plane that constrains movement, enforced if the plane constraint is enabled. Changing the normal automatically sets PlaneConstraintAxisSetting to "Custom". | |
| void | SetPlaneConstraintOrigin (FVector PlaneOrigin) |
| Sets the origin of the plane that constrains movement, enforced if the plane constraint is enabled. | |
| FVector | ConstrainLocationToPlane (FVector Location) const |
| Constrain a position vector to the plane constraint, if enabled. | |
| void | SnapUpdatedComponentToPlane () |
| Snap the updated component to the plane constraint, if enabled. | |
| FVector | ConstrainDirectionToPlane (FVector Direction) const |
| Constrain a direction vector to the plane constraint, if enabled. See: SetPlaneConstraint. | |
| USceneComponent | GetUpdatedComponent () const |
| The component we move and update. If this is null at startup and bAutoRegisterUpdatedComponent is true, the owning Actor's root component will automatically be set as our UpdatedComponent at startup. See: bAutoRegisterUpdatedComponent, SetUpdatedComponent(), UpdatedPrimitive. | |
| bool | GetbUpdateOnlyIfRendered () const |
| If true, skips TickComponent() if UpdatedComponent was not recently rendered. | |
| void | SetbUpdateOnlyIfRendered (bool Value) |
| If true, skips TickComponent() if UpdatedComponent was not recently rendered. | |
| bool | GetbAutoUpdateTickRegistration () const |
| If true, whenever the updated component is changed, this component will enable or disable its tick dependent on whether it has something to update. This will NOT enable tick at startup if bAutoActivate is false, because presumably you have a good reason for not wanting it to start ticking initially. | |
| void | SetbAutoUpdateTickRegistration (bool Value) |
| If true, whenever the updated component is changed, this component will enable or disable its tick dependent on whether it has something to update. This will NOT enable tick at startup if bAutoActivate is false, because presumably you have a good reason for not wanting it to start ticking initially. | |
| bool | GetbTickBeforeOwner () const |
| If true, after registration we will add a tick dependency to tick before our owner (if we can both tick). This is important when our tick causes an update in the owner's position, so that when the owner ticks it uses the most recent position without lag. Disabling this can improve performance if both objects tick but the order of ticks doesn't matter. | |
| void | SetbTickBeforeOwner (bool Value) |
| If true, after registration we will add a tick dependency to tick before our owner (if we can both tick). This is important when our tick causes an update in the owner's position, so that when the owner ticks it uses the most recent position without lag. Disabling this can improve performance if both objects tick but the order of ticks doesn't matter. | |
| bool | GetbAutoRegisterUpdatedComponent () const |
| If true, registers the owner's Root component as the UpdatedComponent if there is not one currently assigned. | |
| void | SetbAutoRegisterUpdatedComponent (bool Value) |
| If true, registers the owner's Root component as the UpdatedComponent if there is not one currently assigned. | |
| bool | GetbConstrainToPlane () const |
| If true, movement will be constrained to a plane. See: PlaneConstraintNormal, PlaneConstraintOrigin, PlaneConstraintAxisSetting. | |
| void | SetbConstrainToPlane (bool Value) |
| If true, movement will be constrained to a plane. See: PlaneConstraintNormal, PlaneConstraintOrigin, PlaneConstraintAxisSetting. | |
| bool | GetbSnapToPlaneAtStart () const |
| If true and plane constraints are enabled, then the updated component will be snapped to the plane when first attached. | |
| void | SetbSnapToPlaneAtStart (bool Value) |
| If true and plane constraints are enabled, then the updated component will be snapped to the plane when first attached. | |
| bool | GetbAutoRegisterPhysicsVolumeUpdates () const |
| If true, then applies the value of bComponentShouldUpdatePhysicsVolume to the UpdatedComponent. If false, will not change bShouldUpdatePhysicsVolume on the UpdatedComponent at all. See: bComponentShouldUpdatePhysicsVolume. | |
| void | SetbAutoRegisterPhysicsVolumeUpdates (bool Value) |
| If true, then applies the value of bComponentShouldUpdatePhysicsVolume to the UpdatedComponent. If false, will not change bShouldUpdatePhysicsVolume on the UpdatedComponent at all. See: bComponentShouldUpdatePhysicsVolume. | |
| bool | GetbComponentShouldUpdatePhysicsVolume () const |
| If true, enables bShouldUpdatePhysicsVolume on the UpdatedComponent during initialization from SetUpdatedComponent(), otherwise disables such updates. Only enabled if bAutoRegisterPhysicsVolumeUpdates is true. WARNING: UpdatePhysicsVolume is potentially expensive if overlap events are also disabled because it requires a separate query against all physics volumes in the world. | |
| void | SetbComponentShouldUpdatePhysicsVolume (bool Value) |
| If true, enables bShouldUpdatePhysicsVolume on the UpdatedComponent during initialization from SetUpdatedComponent(), otherwise disables such updates. Only enabled if bAutoRegisterPhysicsVolumeUpdates is true. WARNING: UpdatePhysicsVolume is potentially expensive if overlap events are also disabled because it requires a separate query against all physics volumes in the world. | |
| bool | MoveUpdatedComponent (FVector Delta, FRotator NewRotation, FHitResult &OutHit, bool bSweep=true, bool bTeleport=false) |
| Moves our UpdatedComponent by the given Delta, and sets rotation to NewRotation. Respects the plane constraint, if enabled. | |
| bool | IsExceedingMaxSpeed (float32 MaxSpeed) const |
| Returns true if the current velocity is exceeding the given max speed (usually the result of GetMaxSpeed()), within a small error tolerance. Note that under normal circumstances updates cause by acceleration will not cause this to be true, however external forces or changes in the max speed limit can cause the max speed to be violated. | |
| void | StopMovementImmediately () |
| Stops movement immediately (zeroes velocity, usually zeros acceleration for components with acceleration). | |
| float32 | GetGravityZ () const |
| Returns gravity that affects this component. | |
| float32 | GetMaxSpeed () const |
| Returns maximum speed of component in current movement mode. | |
| APhysicsVolume | GetPhysicsVolume () const |
| Returns the PhysicsVolume this MovementComponent is using, or the world's default physics volume if none. *. | |
| void | SetUpdatedComponent (USceneComponent NewUpdatedComponent) |
| Assign the component we move and update. | |
| Public Member Functions inherited from UActorComponent | |
| void | Tick (float32 DeltaSeconds) |
| Event called every frame if tick is enabled. | |
| EComponentCreationMethod | GetComponentCreationMethod () const |
| void | SetbIsEditorOnly (bool Value) |
| void | EndPlay (EEndPlayReason EndPlayReason) |
| Blueprint implementable event for when the component ends play, generally via destruction or its Actor's EndPlay. | |
| void | BeginPlay () |
| Blueprint implementable event for when the component is beginning play, called before its owning actor's BeginPlay or when the component is dynamically created if the Actor has already BegunPlay. | |
| void | MarkRenderStateDirty () |
| bool | HasBegunPlay () const |
| void | SetbTickInEditor (bool Value) |
| bool | IsVisualizationComponent () const |
| void | SetIsVisualizationComponent (bool Value) |
| void | AsyncPhysicsTick (float32 DeltaSeconds, float32 SimSeconds) |
| Event called every async physics tick if bAsyncPhysicsTickEnabled is true. | |
| bool | GetbReplicateUsingRegisteredSubObjectList () const |
| When true the replication system will only replicate the registered subobjects list When false the replication system will instead call the virtual ReplicateSubObjects() function where the subobjects need to be manually replicated. | |
| void | SetbReplicateUsingRegisteredSubObjectList (bool Value) |
| When true the replication system will only replicate the registered subobjects list When false the replication system will instead call the virtual ReplicateSubObjects() function where the subobjects need to be manually replicated. | |
| bool | GetbReplicates () const |
| Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first! | |
| void | SetbReplicates (bool Value) |
| Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first! | |
| bool | GetbAutoActivate () const |
| Whether the component is activated at creation or must be explicitly activated. | |
| void | SetbAutoActivate (bool Value) |
| Whether the component is activated at creation or must be explicitly activated. | |
| void | SetbEditableWhenInherited (bool Value) |
| True if this component can be modified when it was inherited from a parent actor class. | |
| void | SetbCanEverAffectNavigation (bool Value) |
| Whether this component can potentially influence navigation. | |
| bool | GetbIsEditorOnly () const |
| If true, the component will be excluded from non-editor builds. | |
| bool | IsBeingDestroyed () const |
| Returns whether the component is in the process of being destroyed. | |
| void | SetIsReplicated (bool ShouldReplicate) |
| Enable or disable replication. This is the equivalent of RemoteRole for actors (only a bool is required for components). | |
| void | DestroyComponent (UObject Object) |
| Unregister and mark for pending kill a component. This may not be used to destroy a component that is owned by an actor unless the owning actor is calling the function. | |
| bool | ComponentHasTag (FName Tag) const |
| See if this component contains the supplied tag. | |
| AActor | GetOwner () const |
| Follow the Outer chain to get the AActor that 'Owns' this component. | |
| void | SetAutoActivate (bool bNewAutoActivate) |
| Sets whether the component should be auto activate or not. Only safe during construction scripts. | |
| bool | IsActive () const |
| Returns whether the component is active or not. | |
| void | ToggleActive () |
| Toggles the active state of the component. | |
| void | SetActive (bool bNewActive, bool bReset=false) |
| Sets whether the component is active or not. | |
| void | Activate (bool bReset=false) |
| Activates the SceneComponent, should be overridden by native child classes. | |
| void | Deactivate () |
| Deactivates the SceneComponent. | |
| float32 | GetComponentTickInterval () const |
| Returns the tick interval for this component's primary tick function, which is the frequency in seconds at which it will be executed. | |
| void | AddTickPrerequisiteActor (AActor PrerequisiteActor) |
| Make this component tick after PrerequisiteActor. | |
| void | AddTickPrerequisiteComponent (UActorComponent PrerequisiteComponent) |
| Make this component tick after PrerequisiteComponent. | |
| void | RemoveTickPrerequisiteComponent (UActorComponent PrerequisiteComponent) |
| Remove tick dependency on PrerequisiteComponent. | |
| void | SetTickableWhenPaused (bool bTickableWhenPaused) |
| Sets whether this component can tick when paused. | |
| bool | IsComponentTickEnabled () const |
| Returns whether this component has tick enabled or not. | |
| void | SetTickGroup (ETickingGroup NewTickGroup) |
| Changes the ticking group for this component. | |
| void | RemoveTickPrerequisiteActor (AActor PrerequisiteActor) |
| Remove tick dependency on PrerequisiteActor. | |
| void | SetComponentTickIntervalAndCooldown (float32 TickInterval) |
| Sets the tick interval for this component's primary tick function. Does not enable the tick interval. Takes effect imediately. | |
| void | SetComponentTickInterval (float32 TickInterval) |
| Sets the tick interval for this component's primary tick function. Does not enable the tick interval. Takes effect on next tick. | |
| void | SetComponentTickEnabled (bool bEnabled) |
| Set this component's tick functions to be enabled or disabled. Only has an effect if the function is registered. | |
| Public Member Functions inherited from UObject | |
| bool | MarkPackageDirty () const |
| void | RemoveFromRoot () |
| bool | GetIsRooted () const |
| bool | IsTransient () const |
| bool | Modify (bool bAlwaysMarkDirty=true) |
| void | SetTransactional (bool bTransactional) |
| bool | IsSupportedForNetworking () const |
| UClass | GetClass () const |
| UObject | GetOuter () const |
| UObject | GetTypedOuter (TSubclassOf< UObject > Target) const |
| Traverses the outer chain searching for the next object of a certain type. | |
| UPackage | GetOutermost () const |
| UPackage | GetPackage () const |
| void | AddToRoot () |
| UWorld | GetWorld () const |
| FName | GetName () const |
| FString | GetFullName (const UObject StopOuter=nullptr) const |
| FString | GetPathName (const UObject StopOuter=nullptr) const |
| bool | IsA (const UClass Class) const |
| Returns true if this object is of the specified type, or a child of that type. | |
| void | SaveConfig () |
| void | LoadConfig () |
| void | ReloadConfig () |
| void | CopyScriptPropertiesFrom (const UObject OtherObject) |
| void | opCast (?&Address) const |
| FString | ToString () const |
Static Public Member Functions | |
Static Functions | |
| static UProjectileMovementComponent | Get (const AActor Actor, FName WithName=NAME_None) |
| static UProjectileMovementComponent | GetOrCreate (AActor Actor, FName WithName=NAME_None) |
| static UProjectileMovementComponent | Create (AActor Actor, FName WithName=NAME_None) |
| static UClass | StaticClass () |
| Static Public Member Functions inherited from UMovementComponent | |
| static UMovementComponent | Get (const AActor Actor, FName WithName=NAME_None) |
| static UMovementComponent | GetOrCreate (AActor Actor, FName WithName=NAME_None) |
| static UMovementComponent | Create (AActor Actor, FName WithName=NAME_None) |
| static UClass | StaticClass () |
| Static Public Member Functions inherited from UActorComponent | |
| static UActorComponent | Get (const AActor Actor, FName WithName=NAME_None) |
| static UActorComponent | GetOrCreate (AActor Actor, FName WithName=NAME_None) |
| static UActorComponent | Create (AActor Actor, FName WithName=NAME_None) |
| static UClass | StaticClass () |
| Static Public Member Functions inherited from UObject | |
| static UClass | StaticClass () |
Public Attributes | |
Homing | |
| const USceneComponent | HomingTargetComponent |
| The current target we are homing towards. Can only be set at runtime (when projectile is spawned or updating). @see bIsHomingProjectile. | |
| bool | bIsHomingProjectile |
| If true, we will accelerate toward our homing target. HomingTargetComponent must be set after the projectile is spawned. @see HomingTargetComponent, HomingAccelerationMagnitude. | |
| float32 | HomingAccelerationMagnitude |
| The magnitude of our acceleration towards the homing target. Overall velocity magnitude will still be limited by MaxSpeed. | |
Projectile | |
| float32 | ProjectileGravityScale |
| Custom gravity scale for this projectile. Set to 0 for no gravity. | |
| bool | bInitialVelocityInLocalSpace |
| If true, the initial Velocity is interpreted as being in local space upon startup. @see SetVelocityInLocalSpace(). | |
| float32 | InitialSpeed |
| Initial speed of projectile. If greater than zero, this will override the initial Velocity value and instead treat Velocity as a direction. | |
| bool | bRotationFollowsVelocity |
| If true, this projectile will have its rotation updated each frame to match the direction of its velocity. | |
| bool | bRotationRemainsVertical |
| If true, this projectile will have its rotation updated each frame to maintain the rotations Yaw only. (bRotationFollowsVelocity is required to be true). | |
ProjectileBounces | |
| const bool | bIsSliding |
| If true, projectile is sliding / rolling along a surface. | |
| float32 | MinFrictionFraction |
| When bounce angle affects friction, apply at least this fraction of normal friction. 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. | |
| FVector | 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. | |
| float32 | BounceVelocityStopSimulatingThreshold |
| If velocity is below this threshold after a bounce, stops simulating and triggers the OnProjectileStop event. Ignored if bShouldBounce is false, in which case the projectile stops simulating on the first impact. @see StopSimulating(), OnProjectileStop. | |
| bool | bBounceAngleAffectsFriction |
| Controls the effects of friction on velocity parallel to the impact surface when bouncing. If true, friction will be modified based on the angle of impact, making friction higher for perpendicular impacts and lower for glancing impacts. If false, a bounce will retain a proportion of tangential velocity equal to (1.0 - Friction), acting as a "horizontal restitution". | |
| bool | bShouldBounce |
| If true, simple bounces will be simulated. Set this to false to stop simulating on contact. | |
| float32 | Bounciness |
| Percentage of velocity maintained after the bounce in the direction of the normal of impact (coefficient of restitution). 1.0 = no velocity lost, 0.0 = no bounce. Ignored if bShouldBounce is false. | |
| float32 | Friction |
| Coefficient of friction, affecting the resistance to sliding along a surface. 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. | |
| float32 | PreviousHitTime |
| Saved HitResult Time (0 to 1) from previous simulation step. Equal to 1.0 when there was no impact. | |
ProjectileInterpolation | |
| float32 | ThrottleInterpolationThresholdNotRenderedShortTime |
| Time after not rendered recently when we consider throttling interpolation. | |
| float32 | InterpRotationTime |
| "Time" over which most of the rotation interpolation occurs, when the UpdatedComponent (target) moves ahead of the interpolated component. 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. | |
| int | ThrottleInterpolationSkipFramesRecent |
| When recently relevant, skip this many frames of interpolation if throttling is enabled. | |
| int | ThrottleInterpolationSkipFramesNotRecent |
| When not recently relevant, skip this many frames of interpolation if throttling is enabled. | |
| float32 | InterpLocationSnapToTargetDistance |
| Max distance behind UpdatedComponent beyond which the interpolated component is snapped to the target location instead. For instance if the target teleports this far beyond the interpolated component, the interpolation is snapped to match the target. | |
| float32 | InterpLocationMaxLagDistance |
| Max distance behind UpdatedComponent which the interpolated component is allowed to lag. | |
| float32 | InterpLocationTime |
| "Time" over which most of the location interpolation occurs, when the UpdatedComponent (target) moves ahead of the interpolated component. 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. | |
| float32 | ThrottleInterpolationThresholdNotRenderedLongTime |
| Time after not rendered for a long time when we consider throttling interpolation. | |
| bool | bSimulationUseScopedMovement |
| If true, uses FScopedMovementUpdate to avoid moving the UpdatedComponent more than once during a tick during simulation. This also defers overlap updates and some impact events until after the simulation update completes, so it may delay important events and continue deflection, so use with caution. | |
| bool | bInterpolationUseScopedMovement |
| If true, uses FScopedMovementUpdate to avoid moving the attached interpolated object's children more than once during a tick when it would both interpolate and move during projectile simulation. This also defers overlap updates for the interpolated object until after the simulation update completes. | |
| bool | bThrottleInterpolation |
| If true, throttle interpolation when not relevant. @see ThrottleInterpolationSkipFramesNotRecent, ThrottleInterpolationSkipFramesRecent, ThrottleInterpolationThresholdNotRenderedShortTime, ThrottleInterpolationThresholdNotRenderedLongTime. | |
| bool | bInterpRotation |
| If true and there is an interpolated component set, rotation interpolation is enabled which allows the interpolated object to smooth uneven updates of the UpdatedComponent's rotation (usually to smooth network updates). Rotation interpolation is only applied if bInterpMovement is also enabled. @see SetInterpolatedComponent(), MoveInterpolationTarget(). | |
| bool | bInterpMovement |
| If true and there is an interpolated component set, location (and optionally rotation) interpolation is enabled which allows the interpolated object to smooth uneven updates of the UpdatedComponent's location (usually to smooth network updates). This requires using SetInterpolatedComponent() to indicate the visual component that lags behind the collision, and using MoveInterpolationTarget() when the new target location/rotation is received (usually on a net update). @see SetInterpolatedComponent(), MoveInterpolationTarget(). | |
ProjectileSimulation | |
| bool | bSimulationEnabled |
| If true, does normal simulation ticking and update. If false, simulation is halted, but component will still tick (allowing interpolation to run). | |
| bool | bForceSubStepping |
| If true, forces sub-stepping to break up movement into discrete smaller steps to improve accuracy of the trajectory. Objects that move in a straight line typically do not need to set this, as movement always uses continuous collision detection (sweeps) so collision is not missed. Sub-stepping is automatically enabled when under the effects of gravity or when homing towards a target. @see MaxSimulationTimeStep, MaxSimulationIterations. | |
| int | MaxSimulationIterations |
| Max number of iterations used for each discrete simulation step. Increasing this value can address precision issues with fast-moving objects or complex collision scenarios, at the cost of performance. | |
| bool | bSweepCollision |
| If true, movement uses swept collision checks. If false, collision effectively teleports to the destination. Note that when this is disabled, movement will never generate blocking collision hits (though overlaps will be updated). | |
| float32 | MaxSimulationTimeStep |
| Max time delta for each discrete simulation step. Lowering this value can address precision issues with fast-moving objects or complex collision scenarios, at the cost of performance. | |
| int | BounceAdditionalIterations |
| On the first few bounces (up to this amount), allow extra iterations over MaxSimulationIterations if necessary. | |
Variables | |
| FOnProjectileBounceDelegate__ProjectileMovementComponent | OnProjectileBounce |
| Called when projectile impacts something and bounces are enabled. | |
| FOnProjectileStopDelegate__ProjectileMovementComponent | OnProjectileStop |
| Called when projectile has come to a stop (velocity is below simulation threshold, bounces are disabled, or it is forcibly stopped). | |
| Public Attributes inherited from UMovementComponent | |
| USceneComponent | UpdatedComponent |
| The component we move and update. If this is null at startup and bAutoRegisterUpdatedComponent is true, the owning Actor's root component will automatically be set as our UpdatedComponent at startup. @see bAutoRegisterUpdatedComponent, SetUpdatedComponent(), UpdatedPrimitive. | |
| bool | bAutoUpdateTickRegistration |
| If true, whenever the updated component is changed, this component will enable or disable its tick dependent on whether it has something to update. This will NOT enable tick at startup if bAutoActivate is false, because presumably you have a good reason for not wanting it to start ticking initially. | |
| bool | bTickBeforeOwner |
| If true, after registration we will add a tick dependency to tick before our owner (if we can both tick). This is important when our tick causes an update in the owner's position, so that when the owner ticks it uses the most recent position without lag. Disabling this can improve performance if both objects tick but the order of ticks doesn't matter. | |
| bool | bComponentShouldUpdatePhysicsVolume |
| If true, enables bShouldUpdatePhysicsVolume on the UpdatedComponent during initialization from SetUpdatedComponent(), otherwise disables such updates. Only enabled if bAutoRegisterPhysicsVolumeUpdates is true. WARNING: UpdatePhysicsVolume is potentially expensive if overlap events are also disabled because it requires a separate query against all physics volumes in the world. | |
| bool | bAutoRegisterUpdatedComponent |
| If true, registers the owner's Root component as the UpdatedComponent if there is not one currently assigned. | |
| bool | bAutoRegisterPhysicsVolumeUpdates |
| If true, then applies the value of bComponentShouldUpdatePhysicsVolume to the UpdatedComponent. If false, will not change bShouldUpdatePhysicsVolume on the UpdatedComponent at all. @see bComponentShouldUpdatePhysicsVolume. | |
| bool | bUpdateOnlyIfRendered |
| If true, skips TickComponent() if UpdatedComponent was not recently rendered. | |
| UPrimitiveComponent | UpdatedPrimitive |
| UpdatedComponent, cast as a UPrimitiveComponent. May be invalid if UpdatedComponent was null or not a UPrimitiveComponent. | |
| bool | bSnapToPlaneAtStart |
| If true and plane constraints are enabled, then the updated component will be snapped to the plane when first attached. | |
| FVector | PlaneConstraintNormal |
| The normal or axis of the plane that constrains movement, if bConstrainToPlane is enabled. If for example you wanted to constrain movement to the X-Z plane (so that Y cannot change), the normal would be set to X=0 Y=1 Z=0. This is recalculated whenever PlaneConstraintAxisSetting changes. It is normalized once the component is registered with the game world. @see bConstrainToPlane, SetPlaneConstraintNormal(), SetPlaneConstraintFromVectors(). | |
| bool | bConstrainToPlane |
| If true, movement will be constrained to a plane. @see PlaneConstraintNormal, PlaneConstraintOrigin, PlaneConstraintAxisSetting. | |
| FVector | PlaneConstraintOrigin |
| The origin of the plane that constrains movement, if plane constraint is enabled. This defines the behavior of snapping a position to the plane, such as by SnapUpdatedComponentToPlane(). @see bConstrainToPlane, SetPlaneConstraintOrigin(). | |
| EPlaneConstraintAxisSetting | PlaneConstraintAxisSetting |
| Setting that controls behavior when movement is restricted to a 2D plane defined by a specific axis/normal, so that movement along the locked axis is not be possible. @see SetPlaneConstraintAxisSetting. | |
| FVector | Velocity |
| Current velocity of updated component. | |
| const APhysicsVolume | PhysicsVolume |
| Returns the PhysicsVolume this MovementComponent is using, or the world's default physics volume if none. *. | |
| const float32 | GravityZ |
| Returns gravity that affects this component. | |
| const float32 | MaxSpeed |
| Returns maximum speed of component in current movement mode. | |
| Public Attributes inherited from UActorComponent | |
| bool | bAutoActivate |
| Whether the component is activated at creation or must be explicitly activated. | |
| TArray< TObjectPtr< UAssetUserData > > | AssetUserData |
| Array of user data stored with the component. | |
| TArray< TObjectPtr< UAssetUserData > > | AssetUserDataEditorOnly |
| Array of user data stored with the component. | |
| bool | bReplicates |
| Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first! | |
| FActorComponentTickFunction | PrimaryComponentTick |
| Main tick function for the Component. | |
| bool | bIsEditorOnly |
| If true, the component will be excluded from non-editor builds. | |
| bool | bReplicateUsingRegisteredSubObjectList |
| When true the replication system will only replicate the registered subobjects list When false the replication system will instead call the virtual ReplicateSubObjects() function where the subobjects need to be manually replicated. | |
| TArray< FName > | ComponentTags |
| Array of tags that can be used for grouping and categorizing. Can also be accessed from scripting. | |
| const EComponentCreationMethod | ComponentCreationMethod |
| const AActor | Owner |
| Follow the Outer chain to get the AActor that 'Owns' this component. | |
| FActorComponentDeactivateSignature | OnComponentDeactivated |
| Called when the component has been deactivated. | |
| FActorComponentActivatedSignature | OnComponentActivated |
| Called when the component has been activated, with parameter indicating if it was from a reset. | |
| float32 | ComponentTickInterval |
| Returns the tick interval for this component's primary tick function, which is the frequency in seconds at which it will be executed. | |
| Public Attributes inherited from UObject | |
| const UClass | Class |
| const UObject | Outer |
| const UPackage | Outermost |
| const UPackage | Package |
| const UWorld | World |
| const FName | Name |
| const bool | IsRooted |
ProjectileMovementComponent updates the position of another component during its tick.
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
|
static |
|
static |
| bool GetbBounceAngleAffectsFriction | ( | ) | const |
Controls the effects of friction on velocity parallel to the impact surface when bouncing. If true, friction will be modified based on the angle of impact, making friction higher for perpendicular impacts and lower for glancing impacts. If false, a bounce will retain a proportion of tangential velocity equal to (1.0 - Friction), acting as a "horizontal restitution".
| bool GetbForceSubStepping | ( | ) | const |
If true, forces sub-stepping to break up movement into discrete smaller steps to improve accuracy of the trajectory. Objects that move in a straight line typically do not need to set this, as movement always uses continuous collision detection (sweeps) so collision is not missed. Sub-stepping is automatically enabled when under the effects of gravity or when homing towards a target. See: MaxSimulationTimeStep, MaxSimulationIterations.
| bool GetbInitialVelocityInLocalSpace | ( | ) | const |
If true, the initial Velocity is interpreted as being in local space upon startup. See: SetVelocityInLocalSpace().
| bool GetbInterpMovement | ( | ) | const |
If true and there is an interpolated component set, location (and optionally rotation) interpolation is enabled which allows the interpolated object to smooth uneven updates of the UpdatedComponent's location (usually to smooth network updates). This requires using SetInterpolatedComponent() to indicate the visual component that lags behind the collision, and using MoveInterpolationTarget() when the new target location/rotation is received (usually on a net update). See: SetInterpolatedComponent(), MoveInterpolationTarget().
| bool GetbInterpolationUseScopedMovement | ( | ) | const |
If true, uses FScopedMovementUpdate to avoid moving the attached interpolated object's children more than once during a tick when it would both interpolate and move during projectile simulation. This also defers overlap updates for the interpolated object until after the simulation update completes.
| bool GetbInterpRotation | ( | ) | const |
If true and there is an interpolated component set, rotation interpolation is enabled which allows the interpolated object to smooth uneven updates of the UpdatedComponent's rotation (usually to smooth network updates). Rotation interpolation is only applied if bInterpMovement is also enabled. See: SetInterpolatedComponent(), MoveInterpolationTarget().
| bool GetbIsHomingProjectile | ( | ) | const |
If true, we will accelerate toward our homing target. HomingTargetComponent must be set after the projectile is spawned. See: HomingTargetComponent, HomingAccelerationMagnitude.
| bool GetbIsSliding | ( | ) | const |
If true, projectile is sliding / rolling along a surface.
| bool GetbRotationFollowsVelocity | ( | ) | const |
If true, this projectile will have its rotation updated each frame to match the direction of its velocity.
| bool GetbRotationRemainsVertical | ( | ) | const |
If true, this projectile will have its rotation updated each frame to maintain the rotations Yaw only. (bRotationFollowsVelocity is required to be true).
| bool GetbShouldBounce | ( | ) | const |
If true, simple bounces will be simulated. Set this to false to stop simulating on contact.
| bool GetbSimulationEnabled | ( | ) | const |
If true, does normal simulation ticking and update. If false, simulation is halted, but component will still tick (allowing interpolation to run).
| bool GetbSimulationUseScopedMovement | ( | ) | const |
If true, uses FScopedMovementUpdate to avoid moving the UpdatedComponent more than once during a tick during simulation. This also defers overlap updates and some impact events until after the simulation update completes, so it may delay important events and continue deflection, so use with caution.
| bool GetbSweepCollision | ( | ) | const |
If true, movement uses swept collision checks. If false, collision effectively teleports to the destination. Note that when this is disabled, movement will never generate blocking collision hits (though overlaps will be updated).
| bool GetbThrottleInterpolation | ( | ) | const |
If true, throttle interpolation when not relevant. See: ThrottleInterpolationSkipFramesNotRecent, ThrottleInterpolationSkipFramesRecent, ThrottleInterpolationThresholdNotRenderedShortTime, ThrottleInterpolationThresholdNotRenderedLongTime.
| const USceneComponent GetHomingTargetComponent | ( | ) | const |
|
static |
| bool IsInterpolationComplete | ( | ) | const |
Returns whether interpolation is complete because the target has been reached. True when interpolation is disabled.
| bool IsVelocityUnderSimulationThreshold | ( | ) | const |
Returns true if velocity magnitude is less than BounceVelocityStopSimulatingThreshold.
Don't allow velocity magnitude to exceed MaxSpeed, if MaxSpeed is non-zero.
Moves the UpdatedComponent, which is also the interpolation target for the interpolated component. If there is not interpolated component, this simply moves UpdatedComponent. Use this typically from PostNetReceiveLocationAndRotation() or similar from an Actor.
| void ResetInterpolation | ( | ) |
Resets interpolation so that interpolated component snaps back to the initial location/rotation without any additional offsets.
| void SetbBounceAngleAffectsFriction | ( | bool | Value | ) |
Controls the effects of friction on velocity parallel to the impact surface when bouncing. If true, friction will be modified based on the angle of impact, making friction higher for perpendicular impacts and lower for glancing impacts. If false, a bounce will retain a proportion of tangential velocity equal to (1.0 - Friction), acting as a "horizontal restitution".
| void SetbForceSubStepping | ( | bool | Value | ) |
If true, forces sub-stepping to break up movement into discrete smaller steps to improve accuracy of the trajectory. Objects that move in a straight line typically do not need to set this, as movement always uses continuous collision detection (sweeps) so collision is not missed. Sub-stepping is automatically enabled when under the effects of gravity or when homing towards a target. See: MaxSimulationTimeStep, MaxSimulationIterations.
| void SetbInitialVelocityInLocalSpace | ( | bool | Value | ) |
If true, the initial Velocity is interpreted as being in local space upon startup. See: SetVelocityInLocalSpace().
| void SetbInterpMovement | ( | bool | Value | ) |
If true and there is an interpolated component set, location (and optionally rotation) interpolation is enabled which allows the interpolated object to smooth uneven updates of the UpdatedComponent's location (usually to smooth network updates). This requires using SetInterpolatedComponent() to indicate the visual component that lags behind the collision, and using MoveInterpolationTarget() when the new target location/rotation is received (usually on a net update). See: SetInterpolatedComponent(), MoveInterpolationTarget().
| void SetbInterpolationUseScopedMovement | ( | bool | Value | ) |
If true, uses FScopedMovementUpdate to avoid moving the attached interpolated object's children more than once during a tick when it would both interpolate and move during projectile simulation. This also defers overlap updates for the interpolated object until after the simulation update completes.
| void SetbInterpRotation | ( | bool | Value | ) |
If true and there is an interpolated component set, rotation interpolation is enabled which allows the interpolated object to smooth uneven updates of the UpdatedComponent's rotation (usually to smooth network updates). Rotation interpolation is only applied if bInterpMovement is also enabled. See: SetInterpolatedComponent(), MoveInterpolationTarget().
| void SetbIsHomingProjectile | ( | bool | Value | ) |
If true, we will accelerate toward our homing target. HomingTargetComponent must be set after the projectile is spawned. See: HomingTargetComponent, HomingAccelerationMagnitude.
| void SetbRotationFollowsVelocity | ( | bool | Value | ) |
If true, this projectile will have its rotation updated each frame to match the direction of its velocity.
| void SetbRotationRemainsVertical | ( | bool | Value | ) |
If true, this projectile will have its rotation updated each frame to maintain the rotations Yaw only. (bRotationFollowsVelocity is required to be true).
| void SetbShouldBounce | ( | bool | Value | ) |
If true, simple bounces will be simulated. Set this to false to stop simulating on contact.
| void SetbSimulationEnabled | ( | bool | Value | ) |
If true, does normal simulation ticking and update. If false, simulation is halted, but component will still tick (allowing interpolation to run).
| void SetbSimulationUseScopedMovement | ( | bool | Value | ) |
If true, uses FScopedMovementUpdate to avoid moving the UpdatedComponent more than once during a tick during simulation. This also defers overlap updates and some impact events until after the simulation update completes, so it may delay important events and continue deflection, so use with caution.
| void SetbSweepCollision | ( | bool | Value | ) |
If true, movement uses swept collision checks. If false, collision effectively teleports to the destination. Note that when this is disabled, movement will never generate blocking collision hits (though overlaps will be updated).
| void SetbThrottleInterpolation | ( | bool | Value | ) |
If true, throttle interpolation when not relevant. See: ThrottleInterpolationSkipFramesNotRecent, ThrottleInterpolationSkipFramesRecent, ThrottleInterpolationThresholdNotRenderedShortTime, ThrottleInterpolationThresholdNotRenderedLongTime.
| void SetHomingTargetComponent | ( | USceneComponent | HomingTargetComponent | ) |
| void SetInterpolatedComponent | ( | USceneComponent | Component | ) |
Assigns the component that will be used for network interpolation/smoothing. 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.
| void SetMaxSpeed | ( | const float32 & | Value | ) |
Limit on speed of projectile (0 means no limit).
| void SetVelocityInLocalSpace | ( | FVector | NewVelocity | ) |
Sets the velocity to the new value, rotated into Actor space.
|
static |
| void StopSimulating | ( | FHitResult | HitResult | ) |
Clears the reference to UpdatedComponent, fires stop event (OnProjectileStop), and stops ticking (if bAutoUpdateTickRegistration is true).
| bool bBounceAngleAffectsFriction |
Controls the effects of friction on velocity parallel to the impact surface when bouncing. If true, friction will be modified based on the angle of impact, making friction higher for perpendicular impacts and lower for glancing impacts. If false, a bounce will retain a proportion of tangential velocity equal to (1.0 - Friction), acting as a "horizontal restitution".
| bool bForceSubStepping |
If true, forces sub-stepping to break up movement into discrete smaller steps to improve accuracy of the trajectory. Objects that move in a straight line typically do not need to set this, as movement always uses continuous collision detection (sweeps) so collision is not missed. Sub-stepping is automatically enabled when under the effects of gravity or when homing towards a target. @see MaxSimulationTimeStep, MaxSimulationIterations.
| bool bInitialVelocityInLocalSpace |
If true, the initial Velocity is interpreted as being in local space upon startup. @see SetVelocityInLocalSpace().
| bool bInterpMovement |
If true and there is an interpolated component set, location (and optionally rotation) interpolation is enabled which allows the interpolated object to smooth uneven updates of the UpdatedComponent's location (usually to smooth network updates). This requires using SetInterpolatedComponent() to indicate the visual component that lags behind the collision, and using MoveInterpolationTarget() when the new target location/rotation is received (usually on a net update). @see SetInterpolatedComponent(), MoveInterpolationTarget().
| bool bInterpolationUseScopedMovement |
If true, uses FScopedMovementUpdate to avoid moving the attached interpolated object's children more than once during a tick when it would both interpolate and move during projectile simulation. This also defers overlap updates for the interpolated object until after the simulation update completes.
| bool bInterpRotation |
If true and there is an interpolated component set, rotation interpolation is enabled which allows the interpolated object to smooth uneven updates of the UpdatedComponent's rotation (usually to smooth network updates). Rotation interpolation is only applied if bInterpMovement is also enabled. @see SetInterpolatedComponent(), MoveInterpolationTarget().
| bool bIsHomingProjectile |
If true, we will accelerate toward our homing target. HomingTargetComponent must be set after the projectile is spawned. @see HomingTargetComponent, HomingAccelerationMagnitude.
| const bool bIsSliding |
If true, projectile is sliding / rolling along a surface.
| int BounceAdditionalIterations |
On the first few bounces (up to this amount), allow extra iterations over MaxSimulationIterations if necessary.
| float32 BounceVelocityStopSimulatingThreshold |
If velocity is below this threshold after a bounce, stops simulating and triggers the OnProjectileStop event. Ignored if bShouldBounce is false, in which case the projectile stops simulating on the first impact. @see StopSimulating(), OnProjectileStop.
| float32 Bounciness |
Percentage of velocity maintained after the bounce in the direction of the normal of impact (coefficient of restitution). 1.0 = no velocity lost, 0.0 = no bounce. Ignored if bShouldBounce is false.
| bool bRotationFollowsVelocity |
If true, this projectile will have its rotation updated each frame to match the direction of its velocity.
| bool bRotationRemainsVertical |
If true, this projectile will have its rotation updated each frame to maintain the rotations Yaw only. (bRotationFollowsVelocity is required to be true).
| bool bShouldBounce |
If true, simple bounces will be simulated. Set this to false to stop simulating on contact.
| bool bSimulationEnabled |
If true, does normal simulation ticking and update. If false, simulation is halted, but component will still tick (allowing interpolation to run).
| bool bSimulationUseScopedMovement |
If true, uses FScopedMovementUpdate to avoid moving the UpdatedComponent more than once during a tick during simulation. This also defers overlap updates and some impact events until after the simulation update completes, so it may delay important events and continue deflection, so use with caution.
| bool bSweepCollision |
If true, movement uses swept collision checks. If false, collision effectively teleports to the destination. Note that when this is disabled, movement will never generate blocking collision hits (though overlaps will be updated).
| bool bThrottleInterpolation |
If true, throttle interpolation when not relevant. @see ThrottleInterpolationSkipFramesNotRecent, ThrottleInterpolationSkipFramesRecent, ThrottleInterpolationThresholdNotRenderedShortTime, ThrottleInterpolationThresholdNotRenderedLongTime.
| float32 Friction |
Coefficient of friction, affecting the resistance to sliding along a surface. 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.
| float32 HomingAccelerationMagnitude |
The magnitude of our acceleration towards the homing target. Overall velocity magnitude will still be limited by MaxSpeed.
| const USceneComponent HomingTargetComponent |
The current target we are homing towards. Can only be set at runtime (when projectile is spawned or updating). @see bIsHomingProjectile.
| float32 InitialSpeed |
Initial speed of projectile. If greater than zero, this will override the initial Velocity value and instead treat Velocity as a direction.
| float32 InterpLocationMaxLagDistance |
Max distance behind UpdatedComponent which the interpolated component is allowed to lag.
| float32 InterpLocationSnapToTargetDistance |
Max distance behind UpdatedComponent beyond which the interpolated component is snapped to the target location instead. For instance if the target teleports this far beyond the interpolated component, the interpolation is snapped to match the target.
| float32 InterpLocationTime |
"Time" over which most of the location interpolation occurs, when the UpdatedComponent (target) moves ahead of the interpolated component. 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.
| float32 InterpRotationTime |
"Time" over which most of the rotation interpolation occurs, when the UpdatedComponent (target) moves ahead of the interpolated component. 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.
| int MaxSimulationIterations |
Max number of iterations used for each discrete simulation step. 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
| float32 MaxSimulationTimeStep |
Max time delta for each discrete simulation step. 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
| float32 MinFrictionFraction |
When bounce angle affects friction, apply at least this fraction of normal friction. 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.
| FOnProjectileBounceDelegate__ProjectileMovementComponent OnProjectileBounce |
Called when projectile impacts something and bounces are enabled.
| FOnProjectileStopDelegate__ProjectileMovementComponent OnProjectileStop |
Called when projectile has come to a stop (velocity is below simulation threshold, bounces are disabled, or it is forcibly stopped).
| FVector 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.
| float32 PreviousHitTime |
Saved HitResult Time (0 to 1) from previous simulation step. Equal to 1.0 when there was no impact.
| float32 ProjectileGravityScale |
Custom gravity scale for this projectile. Set to 0 for no gravity.
| int ThrottleInterpolationSkipFramesNotRecent |
When not recently relevant, skip this many frames of interpolation if throttling is enabled.
| int ThrottleInterpolationSkipFramesRecent |
When recently relevant, skip this many frames of interpolation if throttling is enabled.
| float32 ThrottleInterpolationThresholdNotRenderedLongTime |
Time after not rendered for a long time when we consider throttling interpolation.
| float32 ThrottleInterpolationThresholdNotRenderedShortTime |
Time after not rendered recently when we consider throttling interpolation.