Class PawnMovementComponent
PawnMovementComponent can be used to update movement for an associated Pawn.
Inheritance
Inherited Members
Namespace: UE4.Engine
Assembly: UE4DotNet.dll
Syntax
public class PawnMovementComponent : NavMovementComponent
Remarks
It also provides ways to accumulate and read directional input in a generic way (with AddInputVector(), ConsumeInputVector(), etc). @see APawn
Properties
| Improve this Doc View SourceDefaultObject
Get UE4 Default Object for this Class
Declaration
public static PawnMovementComponent DefaultObject { get; }
Property Value
Type | Description |
---|---|
PawnMovementComponent |
PawnOwner
Pawn that owns this component.
Declaration
public Pawn PawnOwner { get; set; }
Property Value
Type | Description |
---|---|
Pawn |
StaticClass
Get UE4 Class
Declaration
public static Class StaticClass { get; }
Property Value
Type | Description |
---|---|
Class |
Methods
| Improve this Doc View SourceAddInputVector(Vector, Boolean)
Adds the given vector to the accumulated input in world space.
Declaration
public void AddInputVector(Vector WorldVector, bool bForce)
Parameters
Type | Name | Description |
---|---|---|
Vector | WorldVector | |
System.Boolean | bForce |
Remarks
Input vectors are usually between 0 and 1 in magnitude. They are accumulated during a frame then applied as acceleration during the movement update.
@param WorldDirection Direction in world space to apply input @param ScaleValue Scale to apply to input. This can be used for analog input, ie a value of 0.5 applies half the normal value. @param bForce If true always add the input, ignoring the result of IsMoveInputIgnored(). @see APawn::AddMovementInput()
ConsumeInputVector()
Returns the pending input vector and resets it to zero.
Declaration
public Vector ConsumeInputVector()
Returns
Type | Description |
---|---|
Vector |
Remarks
- This should be used during a movement update (by the Pawn or PawnMovementComponent) to prevent accumulation of control input between frames.
- Copies the pending input vector to the saved input vector (GetLastMovementInputVector()).
- @return The pending input vector.
GetLastInputVector()
Return the last input vector in world space that was processed by ConsumeInputVector(), which is usually done by the Pawn or PawnMovementComponent.
Declaration
public Vector GetLastInputVector()
Returns
Type | Description |
---|---|
Vector |
Remarks
Any user that needs to know about the input that last affected movement should use this function. @return The last input vector in world space that was processed by ConsumeInputVector(). @see AddInputVector(), ConsumeInputVector(), GetPendingInputVector()
GetPawnOwner()
Return the Pawn that owns UpdatedComponent.
Declaration
public Pawn GetPawnOwner()
Returns
Type | Description |
---|---|
Pawn |
GetPendingInputVector()
Return the pending input vector in world space.
Declaration
public Vector GetPendingInputVector()
Returns
Type | Description |
---|---|
Vector |
Remarks
This is the most up-to-date value of the input vector, pending ConsumeMovementInputVector() which clears it. PawnMovementComponents implementing movement usually want to use either this or ConsumeInputVector() as these functions represent the most recent state of input. @return The pending input vector in world space. @see AddInputVector(), ConsumeInputVector(), GetLastInputVector()
IsMoveInputIgnored()
Helper to see if move input is ignored. If there is no Pawn or UpdatedComponent, returns true, otherwise defers to the Pawn's implementation of IsMoveInputIgnored().
Declaration
public bool IsMoveInputIgnored()
Returns
Type | Description |
---|---|
System.Boolean |
K2_GetInputVector()
K2 Get Input Vector
Declaration
public Vector K2_GetInputVector()
Returns
Type | Description |
---|---|
Vector |
New(UObject, Name)
Spawn an object of this class
Declaration
public static PawnMovementComponent New(UObject obj = null, Name name = default(Name))
Parameters
Type | Name | Description |
---|---|---|
UObject | obj | |
Name | name |
Returns
Type | Description |
---|---|
PawnMovementComponent |
Operators
| Improve this Doc View SourceImplicit(IntPtr to PawnMovementComponent)
Convert from IntPtr to UObject
Declaration
public static implicit operator PawnMovementComponent(IntPtr p)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | p |
Returns
Type | Description |
---|---|
PawnMovementComponent |