RadialForce applies a force pulling or pushing away from a given world location to the target 更多...
#include <RootMotionSource.h>
类 FRootMotionSource_RadialForce 继承关系图:Public 成员函数 | |
| virtual FRootMotionSource * | Clone () const override |
| virtual bool | Matches (const FRootMotionSource *Other) const override |
| virtual bool | MatchesAndHasSameState (const FRootMotionSource *Other) const override |
| Checks that it Matches() and has the same state (time, track position, etc.) | |
| virtual void | PrepareRootMotion (float SimulationTime, float MovementTickTime, const ACharacter &Character, const UCharacterMovementComponent &MoveComponent) override |
| Generates the RootMotion for this Source, can be used for both "live" generation or for playback (client prediction correction, simulated proxies, etc.) 更多... | |
| virtual bool | UpdateStateFrom (const FRootMotionSource *SourceToTakeStateFrom, bool bMarkForSimulatedCatchup=false) override |
| Mainly for server correction purposes - update this Source's state from another's, usually the authoritative state from the server's version of the Source 更多... | |
Public 成员函数 继承自 FRootMotionSource | |
| virtual void | CheckTimeOut () |
| Checks if this source has timed out and marks for removal if necessary | |
| virtual FRootMotionSource * | Clone () const |
| float | GetDuration () const |
| float | GetStartTime () const |
| float | GetTime () const |
| virtual bool | IsActive () const |
| True when this RootMotionSource should be affecting root motion | |
| bool | IsStartTimeValid () const |
| virtual bool | IsTimeOutEnabled () const |
| virtual bool | Matches (const FRootMotionSource *Other) const |
| virtual bool | MatchesAndHasSameState (const FRootMotionSource *Other) const |
| Checks that it Matches() and has the same state (time, track position, etc.) | |
| virtual void | PrepareRootMotion (float SimulationTime, float MovementTickTime, const ACharacter &Character, const UCharacterMovementComponent &MoveComponent) |
| Generates the RootMotion for this Source, can be used for both "live" generation or for playback (client prediction correction, simulated proxies, etc.) 更多... | |
| virtual void | SetTime (float NewTime) |
| Set the CurrentTime of this source. 更多... | |
| virtual bool | UpdateStateFrom (const FRootMotionSource *SourceToTakeStateFrom, bool bMarkForSimulatedCatchup=false) |
| Mainly for server correction purposes - update this Source's state from another's, usually the authoritative state from the server's version of the Source 更多... | |
额外继承的成员函数 | |
Public 属性 继承自 FRootMotionSource | |
| ERootMotionAccumulateMode | AccumulateMode |
| Accumulation mode for this source (whether or not to additively apply this root motion or override completely) | |
| bool | bInLocalSpace |
| True when this RootMotionSource is contributing local space accumulation (false for world space) | |
| bool | bNeedsSimulatedCatchup |
| True when this RootMotionSource has been marked for simulated catchup - this Simulated version of the Source needs to catch up to where it was before being corrected by authoritative version. | |
| bool | bSimulatedNeedsSmoothing |
| True when this RootMotionSource is running on a SimulatedProxy and has marked itself as needing location/rotation smoothing. 更多... | |
| float | CurrentTime |
| Time elapsed so far for this source | |
| float | Duration |
| The length of this root motion - < 0 for infinite (to be removed manually) | |
| FRootMotionFinishVelocitySettings | FinishVelocityParams |
| Finish Velocity Parameters | |
| FName | InstanceName |
| This name allows us to find the source later so that we can end it. | |
| uint16 | LocalID |
| ID local to this client or server instance. 更多... | |
| float | PreviousTime |
| The last Time entry we had before the last SetTime() - used for simulated catchup | |
| uint16 | Priority |
| Priority of this source relative to other sources - higher number being the highest priority/first applied. | |
| FRootMotionMovementParams | RootMotionParams |
| Root Motion generated by this Source | |
| FRootMotionSourceSettings | Settings |
| Settings of this source | |
| float | StartTime |
| Time this source should start (in character movement client time) This is used to handle cases of inconsistent tick times (ServerMoves ticking for 1 second when root motion should have only applied for the last 0.1 seconds, or root motion source ending halfway through a 0.5 second tick) | |
| FRootMotionSourceStatus | Status |
| Status of this source | |
RadialForce applies a force pulling or pushing away from a given world location to the target
|
overridevirtual |
重载 FRootMotionSource .
|
overridevirtual |
For well-networked RootMotionSources, any given FRootMotionSource child class could implement their own unique ID and simply use that in the Matches check. This "heuristic-style" default was chosen to simplify addition of new RootMotionSources, and assumes that in a networked setting a given RootMotionSource won't be applied many times in a given frame by the same instigator to the same target with the exact same parameters.
Guaranteed uniqueness would also require a strict application order ("RootMotionSources can only be added on Authority") or a prediction-based setup ("Apply on Autonomous and Simulated predictively, then apply on Authority and confirm, and if Authority doesn't confirm remove them"). We avoid that synchronization complexity for now.
See UCharacterMovementComponent::ConvertRootMotionServerIDsToLocalIDs
Should be overridden by child classes, as default implementation only contains basic equivalency checks
重载 FRootMotionSource .
|
overridevirtual |
Generates the RootMotion for this Source, can be used for both "live" generation or for playback (client prediction correction, simulated proxies, etc.)
Examples:
| SimulationTime | How far forward in time to simulate root motion |
| MovementTickTime | How much time the movement is going to take that this is being prepared for |
重载 FRootMotionSource .
|
overridevirtual |
Mainly for server correction purposes - update this Source's state from another's, usually the authoritative state from the server's version of the Source
| bMarkForSimulatedCatchup | sets the source for needing to "catch up" to current state next Prepare |
重载 FRootMotionSource .