I don't need to test my programs. I have an error-correcting modem.
Difference between revisions of "UE3:PrimitiveComponent native functions (UDK)"
(Talk) |
m (1 revision: class descriptions for UDK January update (part 4)) |
(No difference)
|
Latest revision as of 05:44, 17 January 2010
Object >> Component >> ActorComponent >> PrimitiveComponent (native functions) |
Contents
- 1 Native functions
- 1.1 AddForce
- 1.2 AddImpulse
- 1.3 AddRadialForce
- 1.4 AddRadialImpulse
- 1.5 AddTorque
- 1.6 ClosestPointOnComponentToComponent
- 1.7 ClosestPointOnComponentToPoint
- 1.8 GetRootBodyInstance
- 1.9 GetRotation
- 1.10 InitRBPhys
- 1.11 PutRigidBodyToSleep
- 1.12 RetardRBLinearVelocity
- 1.13 RigidBodyIsAwake
- 1.14 SetAbsolute
- 1.15 SetActorCollision
- 1.16 SetBlockRigidBody
- 1.17 SetCullDistance
- 1.18 SetDepthPriorityGroup
- 1.19 SetHidden
- 1.20 SetIgnoreOwnerHidden
- 1.21 SetLightEnvironment
- 1.22 SetLightingChannels
- 1.23 SetNotifyRigidBodyCollision
- 1.24 SetOnlyOwnerSee
- 1.25 SetOwnerNoSee
- 1.26 SetPhysMaterialOverride
- 1.27 SetRBAngularVelocity
- 1.28 SetRBChannel
- 1.29 SetRBCollidesWithChannel
- 1.30 SetRBCollisionChannels
- 1.31 SetRBDominanceGroup
- 1.32 SetRBLinearVelocity
- 1.33 SetRBPosition
- 1.34 SetRBRotation
- 1.35 SetRotation
- 1.36 SetScale
- 1.37 SetScale3D
- 1.38 SetShadowParent
- 1.39 SetTraceBlocking
- 1.40 SetTranslation
- 1.41 SetViewOwnerDepthPriorityGroup
- 1.42 WakeRigidBody
- PrimitiveComponent native functions in other games:
- UT3
- Other member categories for this class:
- properties
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. |
Native functions[edit]
AddForce[edit]
Add a force to this component.
This is like a thruster. Good for adding a burst over some (non zero) time.
Parameters:
- Force - Force vector to apply. Magnitude indicates strength of force.
- Position - Position on object to apply force. If (0,0,0), force is applied at center of mass.
- BoneName - Used in the skeletal case to apply a force to a single body.
AddImpulse[edit]
Add an impulse to the physics of this PrimitiveComponent.
Good for zero time. One time insta burst.
Parameters:
- Impulse - Magnitude and direction of impulse to apply.
- Position - Point in world space to apply impulse at. If Position is (0,0,0), impulse is applied at center of mass ie. no rotation.
- BoneName - If a SkeletalMeshComponent, name of bone to apply impulse to.
- bVelChange - If true, the Strength is taken as a change in velocity instead of an impulse (ie. mass will have no affect).
AddRadialForce[edit]
Add a force originating from the supplied world-space location.
Parameters:
- Origin - Origin of force in world space.
- Radius - Radius within which to apply the force.
- Strength - Strength of force to apply.
- Falloff - Allows you to control the strength of the force as a function of distance from Origin.
AddRadialImpulse[edit]
Add an impulse to this component, radiating out from the specified position. In the case of a skeletal mesh, may affect each bone of the mesh.
Parameters:
- Origin - Point of origin for the radial impulse blast
- Radius - Size of radial impulse. Beyond this distance from Origin, there will be no affect.
- Strength - Maximum strength of impulse applied to body.
- Falloff - Allows you to control the strength of the impulse as a function of distance from Origin.
- bVelChange - If true, the Strength is taken as a change in velocity instead of an impulse (ie. mass will have no affect).
AddTorque[edit]
Add a torque to this component.
Parameters:
- Torque - Force vector to apply. Magnitude indicates strength of force.
- BoneName - Used in the skeletal case to apply a force to a single body.
ClosestPointOnComponentToComponent[edit]
Calculates the closest point this component to another component
Parameters:
- PrimitiveComponent - Another Primitive Component
- PointOnComponentA - Point on this primitive closest to other primitive
- PointOnComponentB - Point on other primitive closest to this primitive
Returns:
- An enumeration indicating the result of the query (intersection/non-intersection/failure)
ClosestPointOnComponentToPoint[edit]
Calculates the closest point on this primitive to a point given
Parameters:
- POI - Point in world space to determine closest point to
- Extent - Convex primitive
- OutPointA - The point closest on the extent box
- OutPointB - Point on this primitive closest to the extent box
Returns:
- An enumeration indicating the result of the query (intersection/non-intersection/failure)
GetRootBodyInstance[edit]
returns the physics RB_BodyInstance for the root body of this component (if any)
GetRotation[edit]
Returns rotation of the component, in world space.
InitRBPhys[edit]
initializes rigid body physics for this component this is done automatically for PrimitiveComponents attached via Actor defaults, but if a component is attached at runtime you may need to call this function to set it up
Note: this function does nothing if not attached or bDisableAllRigidBody is set
PutRigidBodyToSleep[edit]
Put a simulation back to sleep.
RetardRBLinearVelocity[edit]
Reduce velocity of rigid body physics in the direction supplied. This decomposes body velocity into that along supplied vector and that perpendicular to the vector. That along vector, if in same direction as vector, is scale by VelScale. If it is moving in the opposite direction to supplied vector it is not affected.
Parameters:
- RetardDir - Unit vector indicating direction to check velocity of physics against
- VelScale - Value from 0.0 to 1.0 - 1.0 will stop all motion along RetardDir
RigidBodyIsAwake[edit]
Returns if the body is currently awake and simulating. If a SkeletalMeshComponent, and no BoneName is specified, will pick a random bone - so does not make much sense if not all bones are jointed together.
SetAbsolute[edit]
SetActorCollision[edit]
SetBlockRigidBody[edit]
Change the value of BlockRigidBody.
Parameters:
- NewBlockRigidBody - The value to assign to BlockRigidBody.
SetCullDistance[edit]
Changes the value of CullDistance.
Parameters:
- NewCullDistance - The value to assign to CullDistance.
SetDepthPriorityGroup[edit]
Changes the value of DepthPriorityGroup.
Parameters:
- NewDepthPriorityGroup - The value to assign to DepthPriorityGroup.
SetHidden[edit]
Changes the value of HiddenGame.
Parameters:
- NewHidden - The value to assign to HiddenGame.
SetIgnoreOwnerHidden[edit]
Changes the value of bIgnoreOwnerHidden.
SetLightEnvironment[edit]
Changes the value of LightEnvironment.
Parameters:
- NewLightEnvironment - The value to assign to LightEnvironment.
SetLightingChannels[edit]
Changes the value of LightingChannels.
Parameters:
- NewLightingChannels - The value to assign to LightingChannels.
SetNotifyRigidBodyCollision[edit]
Changes the value of bNotifyRigidBodyCollision
Parameters:
- bNewNotifyRigidBodyCollision - The value to assign to bNotifyRigidBodyCollision
SetOnlyOwnerSee[edit]
Changes the value of bOnlyOwnerSee.
SetOwnerNoSee[edit]
Changes the value of bOwnerNoSee.
SetPhysMaterialOverride[edit]
Changes the current PhysMaterialOverride for this component. Note that if physics is already running on this component, this will _not_ alter its mass/inertia etc, it will only change its surface properties like friction and the damping.
SetRBAngularVelocity[edit]
Set the angular velocity of the rigid body physics of this PrimitiveComponent. If no rigid-body physics is active, will do nothing. In the case of a SkeletalMeshComponent will affect all bones - and will apply the linear velocity necessary to get all bones to rotate around the root. This should be used cautiously - it may be better to use AddForce or AddImpulse.
Parameters:
- NewAngVel - New angular velocity to apply to physics.
- bAddToCurrent - If true, NewAngVel is added to the existing velocity of the body.
SetRBChannel[edit]
Changes the rigid-body channel that this object is defined in.
SetRBCollidesWithChannel[edit]
Changes a member of the RBCollideWithChannels container for this PrimitiveComponent.
Parameters:
- bNewCollides - whether or not to collide with passed in channel
SetRBCollisionChannels[edit]
Sets the collision channels based on the settings in the Channel container.
Parameters:
- Channels - is a list of channels with which the component should collide
SetRBDominanceGroup[edit]
Used for creating one-way physics interactions.
See: RBDominanceGroup
SetRBLinearVelocity[edit]
Set the linear velocity of the rigid body physics of this PrimitiveComponent. If no rigid-body physics is active, will do nothing. In the case of a SkeletalMeshComponent will affect all bones. This should be used cautiously - it may be better to use AddForce or AddImpulse.
Parameters:
- NewVel - New linear velocity to apply to physics.
- bAddToCurrent - If true, NewVel is added to the existing velocity of the body.
SetRBPosition[edit]
Called if you want to move the physics of a component which has dynamics running (ie actor is in PHYS_RigidBody). Be careful calling this when this is jointed to something else, or when it does not fit in the destination (no checking is done).
Parameters:
- NewPos - new position of the body
- BoneName - SkeletalMeshComponent only) if specified, the bone to change position of if not specified for a SkeletalMeshComponent, all bodies are moved by the delta between the desired location and that of the root body.
SetRBRotation[edit]
Called if you want to rotate the physics of a component which has dynamics running (ie actor is in PHYS_RigidBody).
Parameters:
- NewRot - new rotation of the body
- BoneName - SkeletalMeshComponent only) if specified, the bone to change rotation of if not specified for a SkeletalMeshComponent, all bodies are moved by the delta between the desired rotation and that of the root body.
SetRotation[edit]
SetScale[edit]
SetScale3D[edit]
SetShadowParent[edit]
Changes the value of ShadowParent.
Parameters:
- NewShadowParent - The value to assign to ShadowParent.
SetTraceBlocking[edit]
SetTranslation[edit]
SetViewOwnerDepthPriorityGroup[edit]
Changes the value of bUseViewOwnerDepthPriorityGroup and ViewOwnerDepthPriorityGroup.
Parameters:
- bNewUseViewOwnerDepthPriorityGroup - The value to assign to bUseViewOwnerDepthPriorityGroup.
- NewViewOwnerDepthPriorityGroup - The value to assign to ViewOwnerDepthPriorityGroup.
WakeRigidBody[edit]
Ensure simulation is running for this component. If a SkeletalMeshComponent and no BoneName is specified, will wake all bones in the PhysicsAsset.