1
0
KF2-Dev-Scripts/Engine/Classes/NxForceFieldRadial.uc
2020-12-13 18:01:13 +03:00

68 lines
2.0 KiB
Ucode

/**
* Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.
*/
class NxForceFieldRadial extends NxForceField
native(ForceField)
placeable;
var() editinline ForceFieldShape Shape;
var ActorComponent DrawComponent;
/** Strength of the force applied by this actor. Positive forces are applied outwards. */
var() interp float ForceStrength;
/** Radius of influence of the force. */
var() interp float ForceRadius;
/** */
var() interp float SelfRotationStrength;
/** Way in which the force falls off as objects are further away from the location. */
var() PrimitiveComponent.ERadialImpulseFalloff ForceFalloff;
/** custom force field kernel */
var const native transient pointer Kernel{class NxForceFieldKernelRadial};
cpptext
{
virtual void InitRBPhys();
virtual void TermRBPhys(FRBPhysScene* Scene);
virtual void DefineForceFunction(FPointer ForceFieldDesc);
virtual FPointer DefineForceFieldShapeDesc();
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent);
#if WITH_EDITOR
virtual void EditorApplyScale(const FVector& DeltaScale, const FMatrix& ScaleMatrix, const FVector* PivotLocation, UBOOL bAltDown, UBOOL bShiftDown, UBOOL bCtrlDown);
#endif
virtual void PostLoad();
#if WITH_PHYSX && WITH_FORCE_FIELD_WORKAROUND
virtual void AddContributions(FLOAT* Contributions, const FLOAT* Positions, const FLOAT* Velocities, UINT Num, FLOAT ForceCoefficient);
#endif
}
/**
* This is used to InitRBPhys for a dynamically spawned ForceField.
* Used for starting RBPhsys on dyanmically spawned force fields. This will probably need to set some transient pointer to NULL
**/
native function DoInitRBPhys();
defaultproperties
{
Begin Object Class=SpriteComponent Name=Sprite
Sprite=Texture2D'EditorResources.S_RadForce'
HiddenGame=True
AlwaysLoadOnClient=False
AlwaysLoadOnServer=False
SpriteCategoryName="Physics"
End Object
Components.Add(Sprite)
ForceRadius=200.0
}