Menu
Lumberyard
Legacy Reference

Physics Nodes

Flow Graph is deprecated and will be removed in a future version of Lumberyard. Learn about Script Canvas, Lumberyard's new visual scripting environment.

This topic references tools and features that are legacy. If you want to use legacy tools in Lumberyard Editor, disable the CryEntity Removal gem using the Project Configurator or the command line. To learn about the latest features, see the Amazon Lumberyard User Guide.

You can use the following flow graph nodes to configure physics.

ActionImpulse node

Used to apply an impulse to an entity.

Inputs

Port Type Description
Activate Any Actives the node
Impulse Vec3 Impulse vector
AngularImpulse Vec3 Angular impulse vector
Point Vec3 Location impulse is applied at
PartIndex Integer Part index
CoordSystem Integer Coordinate system used

CameraProxy node

Used to create a entity camera proxy.

Inputs

Port Type Description
Create Any Creates a physicalized camera proxy if one does not exist
EntityHost Any Syncs proxy rotation with the current view camera

Outputs

Port Type Description
EntityCamera Integer Retrieves the camera proxy

CollisionListener node

Used to setup physics collision listeners.

Inputs

Port Type Description
AddListener Any Adds collision listener
IgnoreSameNode Boolean Suppresses events if both colliders are registered via the same node
RemoveListener Any Removes collision listener

Outputs

Port Type Description
IdA Any ID of the first colliding entity
PartIdA Integer Part ID inside the first colliding entity
IdB Any ID of the second colliding entity
PartIdB Integer Part ID inside the second colliding entity
Point Vec3 Location of collision point
Normal Vec3 Collision normal
SurfacetypeA String Surface type of the first colliding entity
SurfacetypeB String Surface type of the second colliding entity
HitImpulse Float Collision impulse along the normal

Constraint node

Used to create a physics constraint.

Inputs

Port Type Description
Create Any Creates the constraint
Break Any Breaks the constraint
Id Integer Constraint ID
EntityA Any Constraint owner entity
PartIdA Integer Part ID to attach to
EntityB Any Constraint buddy entity
PartIdB Integer Part ID to attach to
Point Vec3 Connection point in worldspace
IgnoreCollisions Boolean Disables collisions between constrained entities
Breakable Boolean Break if force limit is reached
ForceAwake Boolean Make entity B always awake; restores previous sleep parameters
MaxForce Float Force limit
MaxTorque Float Rotational force (torque) force limit
MaxForceRelative Any Make limits relative to entity B's mass
TwistAxis Boolean Main rotation axis in worldspace
MinTwist Float Lower rotation limit around TwistAxis
MaxTwist Float Upper rotation limit around TwistAxis
MaxBend Float Maximum bend of the TwistAxis

Outputs

Port Type Description
Id Integer Constraint ID
Broken Boolean Triggered when the constraint breaks

Dynamics node

Used to output the dynamic state of an entity.

Inputs

Port Type Description
Enable Any Enables updates
Disable Any Disables updates

Outputs

Port Type Description
Velocity Vec3 Velocity of entity
Acceleration Vec3 Acceleration of entity
AngularVelocity Vec3 Angular velocity of entity
AngularAcceleration Vec3 Angular acceleration of entity
Mass Float Mass of entity

PhysicsEnable node

Used to enable and disable physics.

Inputs

Port Type Description
EnablePhysics Any Enables physics for entity
DisablePhysics Any Disables physics for entity
EnableAI Any Enables AI for entity
DisableAI Any Disables AI for entity

PhysicsSleepQuery node

Used to return the sleeping state of the physics of a given entity.

Inputs

Port Type Description
Condition Boolean Sleeping state of the entity
Reset Boolean Resets the node

Outputs

Port Type Description
Sleeping Boolean Sleeping state of the entity
OnSleep Any Triggered when the entity physics switches to sleep
OneAwake Any Triggered when the entity physics switches to awake

RayCast node

Used to perform a raycast relative to an entity.

Inputs

Port Type Description
Activate Any Activates the node
Direction Vec3 Direction of the raycast
MaxLength Float Maximum length of the raycast
Position Vec3 Ray start position relative to the entity
TransformDirection Boolean Transforms direction by entity orientation

Outputs

Port Type Description
NoHit Any Triggered if no object was hit by the raycast
Hit Any Triggered if an object was hit by the raycast
RayDirection Vec3 Direction of the cast ray
HitDistance Float Distance to the hit object
HitPoint Vec3 Position of the hit
HitNormal Vec3 Normal of the surface at the HitPoint
HitSurfaceType Integer Surface type index of the surface hit
HitEntity Any ID of the entity that was hit

RaycastCamera node

Used to perform a raycast relative to a camera.

Inputs

Port Type Description
Activate Any Activates the node
PositionOffset Vec3 Ray start position relative to the camera
MaxLength Float Maximum length of the raycast

Outputs

Port Type Description
NoHit Any Triggered if no object was hit by the raycast
Hit Any Triggered if an object was hit by the raycast
RayDirection Vec3 Direction of the cast ray
HitDistance Float Distance to the hit object
HitPoint Vec3 Position of the hit
HitNormal Any Normal of the surface at the HitPoint
HitSurfaceType Integer Surface type index of the surface hit
partid Integer Hit part ID
HitEntity Any ID of the entity that was hit
entityPhysId Any ID of the physical entity that was hit