/// <summary>Gets the last hit result generated by the component.  Returns the custom hit result if that was set.</summary>
        public FHitResult GetLastHitResult()
        {
            CheckIsValid();
            FHitResult ___ret = GetLastHitResult(_this.Get());

            return(___ret);
        }
Example #2
0
/// <summary>
/// Moves our UpdatedComponent by the given Delta, and sets rotation to NewRotation.
/// Respects the plane constraint, if enabled.
/// @return True if some movement occurred, false if no movement occurred. Result of any impact will be stored in OutHit.
/// </summary>
        public bool K2_MoveUpdatedComponent(FVector Delta, FRotator NewRotation, out FHitResult OutHit, bool bSweep = true, bool bTeleport = false)
        {
            CheckIsValid();
            int ___ret = K2_MoveUpdatedComponent(_this.Get(), ref Delta, ref NewRotation, out OutHit, bSweep?1:0, bTeleport?1:0);

            return(___ret != 0);
        }
/// <summary>Return true if the hit result should be considered a walkable surface for the character.</summary>
        public bool IsWalkable(FHitResult Hit)
        {
            CheckIsValid();
            int ___ret = IsWalkable(_this.Get(), ref Hit);

            return(___ret != 0);
        }
 protected override void CapsuleTouched(UPrimitiveComponent overlappedComp, AActor other, UPrimitiveComponent otherComp, int otherBodyIndex, bool bFromSweep, FHitResult sweepResult)
 {
 }
 /// <summary>
 /// <para>Compute a movement direction when contacting two surfaces. </para>
 /// <param name="Delta">In] Amount of move attempted before impact. [Out] Computed adjustment based on impacts. </param>
 /// <param name="Hit">Impact from last attempted move </param>
 /// <param name="OldHitNormal">Normal of impact before last attempted move </param>
 /// <return>Result in Delta that is the direction to move when contacting two surfaces. </return>
 /// </summary>
 public virtual void TwoWallAdjust(FVector delta, FHitResult hit, FVector oldHitNormal)
 => E_UMovementComponent_TwoWallAdjust(this, delta, hit, oldHitNormal);
Example #6
0
 extern static void K2_SetRelativeTransform(IntPtr _this, ref FTransform NewTransform, int bSweep, out FHitResult SweepHitResult, int bTeleport);
/// <summary>Set custom hit result.  This is only taken into account if InteractionSource is set to EWidgetInteractionSource::Custom.</summary>
        public void SetCustomHitResult(FHitResult HitResult)
        {
            CheckIsValid();
            SetCustomHitResult(_this.Get(), ref HitResult);
        }
 /// <summary>Clears the reference to UpdatedComponent, fires stop event (OnProjectileStop), and stops ticking (if bAutoUpdateTickRegistration is true).</summary>
 public void StopSimulating(FHitResult HitResult)
 {
     CheckIsValid();
     StopSimulating(_this.Get(), ref HitResult);
 }
 /// <summary>
 /// Use new physics after landing. Defaults to swimming if in water, walking otherwise.
 /// </summary>
 protected override void SetPostLandedPhysics(FHitResult hit)
 {
 }
 /// <summary>
 /// Event triggered when we are moving on a base but we are not able to move the full DeltaPosition because something has blocked us.
 /// <para>Note: MoveComponentFlags includes the flag to ignore the movement base while this event is fired. </para>
 /// </summary>
 /// <param name="deltaPosition">How far we tried to move with the base.</param>
 /// <param name="oldLocation">Location before we tried to move with the base.</param>
 /// <param name="moveOnBaseHit">Hit result for the object we hit when trying to move with the base.</param>
 protected override void OnUnableToFollowBaseMove(FVector deltaPosition, FVector oldLocation, FHitResult moveOnBaseHit)
 {
 }
 /// <summary>
 /// <para>Moves our UpdatedComponent by the given Delta, and sets rotation to NewRotation. </para>
 /// <para>Respects the plane constraint, if enabled. </para>
 /// <return>True if some movement occurred, false if no movement occurred. Result of any impact will be stored in OutHit. </return>
 /// </summary>
 public bool K2_MoveUpdatedComponent(FVector delta, FRotator newRotation, FHitResult outHit, bool bSweep = true, bool bTeleport = false)
 => E_UMovementComponent_K2_MoveUpdatedComponent(this, delta, newRotation, outHit, bSweep, bTeleport);
 /// <summary>
 /// <para>Called for Blocking impact </para>
 /// <param name="Hit">Describes the collision. </param>
 /// <param name="TimeSlice">Time period for the simulation that produced this hit.  Useful for </param>
 /// <para>putting Hit.Time in context.  Can be zero in certain situations where it's not appropriate, </para>
 /// <para>be sure to handle that. </para>
 /// <param name="MoveDelta">Attempted move that resulted in the hit. </param>
 /// </summary>
 public virtual void HandleImpact(FHitResult hit, float timeSlice, FVector moveDelta)
 => E_UMovementComponent_HandleImpact(this, hit, timeSlice, moveDelta);
 /// <summary>
 /// <para>Calculate a movement adjustment to try to move out of a penetration from a failed move. </para>
 /// <param name="Hit">the result of the failed move </param>
 /// <return>The adjustment to use after a failed move, or a zero vector if no attempt should be made. </return>
 /// </summary>
 public virtual FVector GetPenetrationAdjustment(FHitResult hit)
 => E_UMovementComponent_GetPenetrationAdjustment(this, hit);
 /// <summary>
 /// <para>Compute a vector to slide along a surface, given an attempted move, time, and normal. </para>
 /// <param name="Delta">Attempted move. </param>
 /// <param name="Time">Amount of move to apply (between 0 and 1). </param>
 /// <param name="Normal">Normal opposed to movement. Not necessarily equal to Hit.Normal. </param>
 /// <param name="Hit">HitResult of the move that resulted in the slide. </param>
 /// </summary>
 public virtual FVector ComputeSlideVector(FVector delta, float time, FVector normal, FHitResult hit)
 => E_UMovementComponent_ComputeSlideVector(this, delta, time, normal, hit);
Example #15
0
/// <summary>
/// Set the location of the component relative to its parent
/// @param NewLocation           New location of the component relative to its parent.
/// @param SweepHitResult        Hit result from any impact if sweep is true.
/// @param bSweep                        Whether we sweep to the destination location, triggering overlaps along the way and stopping short of the target if blocked by something.
///                                                      Only the root component is swept and checked for blocking collision, child components move without sweeping. If collision is off, this has no effect.
/// @param bTeleport                     Whether we teleport the physics state (if physics collision is enabled for this object).
///                                                      If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location).
///                                                      If false, physics velocity is updated based on the change in position (affecting ragdoll parts).
///                                                      If CCD is on and not teleporting, this will affect objects along the entire sweep volume.
/// </summary>
        public void K2_SetRelativeLocation(FVector NewLocation, bool bSweep, out FHitResult SweepHitResult, bool bTeleport)
        {
            CheckIsValid();
            K2_SetRelativeLocation(_this.Get(), ref NewLocation, bSweep?1:0, out SweepHitResult, bTeleport?1:0);
        }
Example #16
0
 extern static void K2_SetRelativeLocation(IntPtr _this, ref FVector NewLocation, int bSweep, out FHitResult SweepHitResult, int bTeleport);
Example #17
0
/// <summary>
/// Set the transform of the component relative to its parent
/// @param NewTransform          New transform of the component relative to its parent.
/// @param SweepHitResult        Hit result from any impact if sweep is true.
/// @param bSweep                        Whether we sweep to the destination (currently not supported for rotation).
/// @param bTeleport                     Whether we teleport the physics state (if physics collision is enabled for this object).
///                                                      If true, physics velocity for this object is unchanged (so ragdoll parts are not affected by change in location).
///                                                      If false, physics velocity is updated based on the change in position (affecting ragdoll parts).
/// </summary>
        public void K2_SetRelativeTransform(FTransform NewTransform, bool bSweep, out FHitResult SweepHitResult, bool bTeleport)
        {
            CheckIsValid();
            K2_SetRelativeTransform(_this.Get(), ref NewTransform, bSweep?1:0, out SweepHitResult, bTeleport?1:0);
        }
 protected override void HandleSwimmingWallHit(FHitResult hit, float deltaTime)
 {
 }
 /// <summary>
 /// Notification that the character is stuck in geometry.  Only called during walking movement.
 /// </summary>
 protected override void OnCharacterStuckInGeometry(FHitResult hit)
 {
 }
 protected virtual bool MoveUpdatedComponentImpl(FVector delta, FQuat newRotation, bool bSweep, FHitResult outHit, ETeleportType teleport)
 => E_UMovementComponent_MoveUpdatedComponentImpl(this, delta, newRotation, bSweep, outHit, (byte)teleport);
 /// <summary>
 /// Handle landing against Hit surface over remaingTime and iterations, calling SetPostLandedPhysics() and starting the new movement mode.
 /// </summary>
 protected override void ProcessLanded(FHitResult hit, float remainingTime, int iterations)
 {
 }
 public bool ResolvePenetration(FVector adjustment, FHitResult hit, FRotator newRotation)
 => E_UMovementComponent_ResolvePenetration_o1(this, adjustment, hit, newRotation);
 /// <summary>
 /// Apply physics forces to the impacted component, if bEnablePhysicsInteraction is true.
 /// </summary>
 /// <param name="impact">HitResult that resulted in the impact</param>
 /// <param name="impactAcceleration">Acceleration of the character at the time of impact</param>
 /// <param name="impactVelocity">Velocity of the character at the time of impact</param>
 protected override void ApplyImpactPhysicsForces(FHitResult impact, FVector impactAcceleration, FVector impactVelocity)
 {
 }
 protected virtual bool ResolvePenetrationImpl(FVector adjustment, FHitResult hit, FQuat newRotation)
 => E_UMovementComponent_ResolvePenetrationImpl(this, adjustment, hit, newRotation);
 static extern void StopSimulating(IntPtr _this, ref FHitResult HitResult);
 extern static void SetCustomHitResult(IntPtr _this, ref FHitResult HitResult);
 public bool SafeMoveUpdatedComponent(FVector delta, FRotator newRotation, bool bSweep, FHitResult outHit, ETeleportType teleport)
 => E_UMovementComponent_SafeMoveUpdatedComponent_o1(this, delta, newRotation, bSweep, outHit, (byte)teleport);
Example #28
0
 extern static void K2_SetWorldLocationAndRotation(IntPtr _this, ref FVector NewLocation, ref FRotator NewRotation, int bSweep, out FHitResult SweepHitResult, int bTeleport);
Example #29
0
 /// <summary>Set custom hit result.  This is only taken into account if InteractionSource is set to EWidgetInteractionSource::Custom.</summary>
 public extern void SetCustomHitResult(FHitResult HitResult);
 /// <summary>
 /// <para>Slide smoothly along a surface, and slide away from multiple impacts using TwoWallAdjust if necessary. Calls HandleImpact for each surface hit, if requested. </para>
 /// <para>Uses SafeMoveUpdatedComponent() for movement, and ComputeSlideVector() to determine the slide direction. </para>
 /// <param name="Delta">Attempted movement vector. </param>
 /// <param name="Time">Percent of Delta to apply (between 0 and 1). Usually equal to the remaining time after a collision: (1.0 - Hit.Time). </param>
 /// <param name="Normal">Normal opposing movement, along which we will slide. </param>
 /// <param name="Hit">In] HitResult of the attempted move that resulted in the impact triggering the slide. [Out] HitResult of last attempted move. </param>
 /// <param name="bHandleImpact">Whether to call HandleImpact on each hit. </param>
 /// <return>The percentage of requested distance (Delta * Percent) actually applied (between 0 and 1). 0 if no movement occurred, non-zero if movement occurred. </return>
 /// </summary>
 public virtual float SlideAlongSurface(FVector delta, float time, FVector normal, FHitResult hit, bool bHandleImpact)
 => E_UMovementComponent_SlideAlongSurface(this, delta, time, normal, hit, bHandleImpact);