Gah - a solution with more questions. – EntropicLqd
UE3:Object functions (UDK)
Object (functions) |
Contents
- 1 Functions
- 1.1 Static native functions
- 1.2 Other static functions
- 1.2.1 ClampRotAxis
- 1.2.2 ClampRotAxisFromBase
- 1.2.3 ClampRotAxisFromRange
- 1.2.4 ColorToLinearColor
- 1.2.5 FindDeltaAngle
- 1.2.6 FInterpEaseIn
- 1.2.7 FInterpEaseOut
- 1.2.8 FPctByRange
- 1.2.9 GetAngularDegreesFromRadians
- 1.2.10 GetHeadingAngle
- 1.2.11 GetRangePctByValue
- 1.2.12 GetRangeValueByPct
- 1.2.13 GetRightMost
- 1.2.14 JoinArray
- 1.2.15 LerpColor
- 1.2.16 MakeColor
- 1.2.17 MakeLinearColor
- 1.2.18 MakeRotator
- 1.2.19 ParseLocalizedPropertyPath
- 1.2.20 RandRange
- 1.2.21 RSize
- 1.2.22 SClampRotAxis
- 1.2.23 Split
- 1.2.24 SplitString
- 1.2.25 UnwindHeading
- 1.2.26 vect2d
- 1.3 Native functions
- 1.3.1 Disable
- 1.3.2 DumpStateStack
- 1.3.3 Enable
- 1.3.4 EvalInterpCurveFloat
- 1.3.5 EvalInterpCurveVector
- 1.3.6 EvalInterpCurveVector2D
- 1.3.7 GetStateName
- 1.3.8 GetSystemTime
- 1.3.9 GotoState
- 1.3.10 IsA
- 1.3.11 IsChildState
- 1.3.12 IsInState
- 1.3.13 IsPendingKill
- 1.3.14 PointDistToLine
- 1.3.15 PointDistToSegment
- 1.3.16 PopState
- 1.3.17 PushState
- 1.3.18 SaveConfig
- 1.3.19 TimeStamp
- 1.3.20 TransformVectorByRotation
- 1.4 Events
- 1.5 Other instance functions
;Other member categories for this class::operators, static native functions, structs
This is an auto-generated page and may need human attention. Please remove the {{autogenerated}} tag if the page seems reasonably complete or replace it with the {{expand}} tag if the page is not yet complete. |
Functions
Static native functions
See Object static native functions.
Other static functions
ClampRotAxis
Clamp a rotation Axis. The ViewAxis rotation component must be normalized (within the [-32768,+32767] range). This function will set out_DeltaViewAxis to the delta needed to bring ViewAxis within the [MinLimit,MaxLimit] range.
Parameters:
- ViewAxis - Rotation Axis to clamp
- out_DeltaViewAxis - Delta Rotation Axis to be added to ViewAxis rotation (from ProcessViewRotation). Set to be the Delta to bring ViewAxis within the [MinLimit,MaxLimit] range.
- MaxLimit - Maximum for Clamp. ViewAxis will not exceed this.
- MinLimit - Minimum for Clamp. ViewAxis will not go below this.
ClampRotAxisFromBase
Clamp Rotator Axis.
Parameters:
- Current - Input axis angle.
- Center - Center of allowed angle.
- MaxDelta - Maximum delta allowed.
Returns:
- axis angle clamped between [Center-MaxDelta, Center+MaxDelta]
ClampRotAxisFromRange
Clamp Rotator Axis.
Parameters:
- Current - Input axis angle.
- Min - Min allowed angle.
- Max - Max allowed angle.
Returns:
- axis angle clamped between [Min, Max]
ColorToLinearColor
converts a color to a LinearColor
Parameters:
- OldColor - the color to convert
Returns:
- the matching LinearColor
FindDeltaAngle
Gets the difference in world space angles in [-PI,PI] range
Parameters:
- A1 - First angle
- A2 - Second angle
FInterpEaseIn
Interpolates with ease-in (smoothly approaches B).
Parameters:
- A - Value to interpolate from.
- B - Value to interpolate to.
- Alpha - Interpolant.
- Exp - Exponent. Higher values result in more rapid deceleration.
Returns:
- Interpolated value.
FInterpEaseOut
Interpolates with ease-out (smoothly departs A).
Parameters:
- A - Value to interpolate from.
- B - Value to interpolate to.
- Alpha - Interpolant.
- Exp - Exponent. Higher values result in more rapid acceleration.
Returns:
- Interpolated value.
FPctByRange
Returns the relative percentage position Value is in the range [Min,Max]. Examples: - GetRangeValueByPct( 2, 4, 2 ) == 0 - GetRangeValueByPct( 2, 4, 4 ) == 1 - GetRangeValueByPct( 2, 4, 3 ) == 0.5
Parameters:
- Min - Min limit
- Max - Max limit
- Value - Value between Range.
Returns:
- relative percentage position Value is in the range [Min,Max].
GetAngularDegreesFromRadians
GetHeadingAngle
Returns world space angle (in radians) of given vector
Parameters:
- Dir - Vector to be converted into heading angle
GetRangePctByValue
Returns the relative percentage position Value is in the Range. Examples: - GetRangeValueByPct( Range, Range.X ) == 0 - GetRangeValueByPct( Range, Range.Y ) == 1 - GetRangeValueByPct( Range, (Range.X+Range.Y)/2 ) == 0.5
Parameters:
- Range - Range of values. [Range.X,Range.Y]
- Value - Value between Range.
Returns:
- relative percentage position Value is in the Range.
GetRangeValueByPct
Returns the value in the Range, relative to Pct. Examples: - GetRangeValueByPct( Range, 0.f ) == Range.X - GetRangeValueByPct( Range, 1.f ) == Range.Y - GetRangeValueByPct( Range, 0.5 ) == (Range.X+Range.Y)/2
Parameters:
- Range - Range of values. [Range.X,Range.Y]
- Pct - Relative position in range in percentage. [0,1]
Returns:
- the value in the Range, relative to Pct.
GetRightMost
Get right most number from an actor name (ie Text == "CoverLink_45" returns "45")
JoinArray
Create a single string from an array of strings, using the delimiter specified, optionally ignoring blank members
Parameters:
- StringArray - the array of strings to join into the single string
- out_Result - out] will contain a single string containing all elements of the array, separated by the delimiter specified
- Delim - the delimiter to insert where array elements are concatenated
- bIgnoreBlanks - TRUE to skip elements which contain emtpy strings
LerpColor
Util to interpolate between two colors
MakeColor
Create a Color from independant RGBA components
MakeLinearColor
Create a LinearColor from independant RGBA components.
MakeRotator
Create a Rotation from independant Pitch, Yaw, Roll
ParseLocalizedPropertyPath
given a path to a localized key of the form "Package.Section.Name", return the appropriate value from the localization file for the current language
RandRange
Return a random number within the given range.
RSize
returns Rotator Size (vector definition applied to rotators)
Parameters:
- Rotator - R
Returns:
- mathematical vector length: Sqrt(Pitch^2 + Yaw^2 + Roll^2)
SClampRotAxis
Smooth clamp a rotator axis. This is mainly used to bring smoothly a rotator component within a certain range [MinLimit,MaxLimit]. For example to limit smoothly the player's ViewRotation Pitch or Yaw component.
Parameters:
- fDeltaTime - Elapsed time since this function was last called, for interpolation.
- ViewAxis - Rotator's Axis' current angle.
- out_DeltaViewAxis - Delta Value of Axis to be added to ViewAxis (through PlayerController::ProcessViewRotation(). This value gets modified.
- MaxLimit - Up angle limit.
- MinLimit - Negative angle limit (value must be negative)
- InterpolationSpeed - Interpolation Speed to bring ViewAxis within the [MinLimit,MaxLimit] range.
Split
Splits Text on the first Occurrence of Split and returns the remaining part of Text.
SplitString
Wrapper for splitting a string into an array of strings using a single expression.
UnwindHeading
vect2d
Construct a vector2d variable
Native functions
Disable
DumpStateStack
Logs the current state stack for debugging purposes.
Enable
EvalInterpCurveFloat
Evaluate a float curve for an input of InVal
EvalInterpCurveVector
Evaluate a vector curve for an input of InVal
EvalInterpCurveVector2D
Evaluate a vector2D curve for an input of InVal
GetStateName
Returns the current state name, useful for determining current state similar to IsInState. Note: This *doesn't* work with inherited states, in that it will only compare at the lowest state level.
Returns:
- Name of the current state
GetSystemTime
Return the system time components.
GotoState
Transitions to the desired state and label if specified, generating the EndState event in the current state if applicable and BeginState in the new state, unless transitioning to the same state.
Parameters:
- NewState - new state to transition to
- Label - optional Label to jump to
- bForceEvents - optionally force EndState/BeginState to be called even if transitioning to the same state.
- bKeepStack - prevents state stack from being cleared
IsA
IsChildState
Returns true if TestState derives from TestParentState.
IsInState
Checks the current state and determines whether or not this object is actively in the specified state. Note: This does work with inherited states.
Parameters:
- TestState - state to check for
- bTestStateStack - check the state stack? (does *NOT* work with inherited states in the stack)
Returns:
- True if currently in TestState
IsPendingKill
Returns whether the object is pending kill and about to have references to it NULLed by the garbage collector.
Returns:
- TRUE if object is pending kill, FALSE otherwise
PointDistToLine
Calculates the distance of a given Point in world space to a given line, defined by the vector couple (Origin, Direction).
Parameters:
- Point - point to check distance to Axis
- Line - unit vector indicating the direction to check against
- Origin - point of reference used to calculate distance
- OutClosestPoint - optional point that represents the closest point projected onto Axis
Returns:
- distance of Point from line defined by (Origin, Direction)
PointDistToSegment
Returns closest distance from a point to a segment.
Parameters:
- Point - point to check distance for
- StartPoint - StartPoint of segment
- EndPoint - EndPoint of segment
- OutClosestPoint - Closest point on segment.
Returns:
- closest distance from Point to segment defined by (StartPoint, EndPoint).
PopState
Pops the current pushed state, returning execution to the previous state at the same code point. Note: PopState() will have no effect if no state has been pushed onto the stack.
This will call PoppedState when entering the state that was just pushed on the state stack. It will not call EndState.
Parameters:
- bPopAll - optionally pop all states on the stack to the originally executing one
See: event PausedState
PushState
Pushes the new state onto the state stack, setting it as the current state until a matching PopState() is called. Note that multiple states may be pushed on top of each other. You may not push the same state multiple times.
This will call PushedState when entering the state that was just pushed on the state stack. It will not call BeginState.
Parameters:
- NewState - name of the state to push on the stack
- NewLabel - optional name of the state label to jump to
See: event ContinuedState
SaveConfig
TimeStamp
Returns a string containing a system timestamp
TransformVectorByRotation
Script hook to FRotationMatrix::TransformFVector().
Events
BeginState
Called immediately when entering a state, while within the GotoState() call that caused the state change (before any state code is executed).
ContinuedState
Called on the state that is no longer paused because of a PopState().
EndState
Called immediately before going out of the current state, while within the GotoState() call that caused the state change, and before BeginState() is called within the new state.
PausedState
Called on the state that is being paused because of a PushState().
PoppedState
Called immediately in the current state that is being popped off of the state stack, before the new state is activated.
PushedState
Called immediately in the new state that was pushed onto the state stack, before any state code is executed.
Other instance functions
ByteToFloat
Converts a 0-255 byte to a float value, to a range of 0.f to 1.f.
Parameters:
- inputByte - byte to convert
- bSigned - optional, spit out -1.f to 1.f instead
Returns:
- newly converted value
FloatToByte
Converts a float value to a 0-255 byte, assuming a range of 0.f to 1.f.
Parameters:
- inputFloat - float to convert
- bSigned - optional, assume a range of -1.f to 1.f
Returns:
- byte value 0-255
GetPackageName
Returns:
- the name of the package this object resides in
InCylinder
NoZDot
Returns dot product of two vectors while ignoring the Z component.
PointDistToPlane
Calculates the distance of a given point to the given plane. (defined by a combination of vector and rotator) Rotator.AxisX = U, Rotator.AxisY = Normal, Rotator.AxisZ = V
Parameters:
- Point - Point to check distance to Orientation
- Orientation - Rotator indicating the direction to check against
- Origin - Point of reference used to calculate distance
- out_ClosestPoint - Optional point that represents the closest point projected onto Plane defined by the couple (Origin, Orientation)
Returns:
- distance of Point to plane