OmniGraph Node Force Field: Spin

Properties

Name

Value

Unique ID

omni.physx.forcefields.ForceFieldSpin

Version

1

Extension

omni.physx.forcefields

Has State?

False

Implementation Language

C++

Default Memory Type

cpu

Generated Code Exclusions

tests, usd

tags

force,fields,spin,rotate,physx,simulation

uiName

Force Field: Spin

__exclusions

tests,usd

Generated Class Name

OgnForceFieldSpinDatabase

Python Module

omni.physxforcefields

Description

A force field that applies forces to rotate rigid bodies around a line, defined by a spin axis, and varies with the function coefficients. Positive values rotate clockwise around the spin axis when looking along the axis. The net force on the rigid body is calculated using f = constant + linear * r + inverseSquare / r^2.

Inputs

Name

Type

Default

Required?

Descripton

inputs:constant

float

0.0

Y

constant applies a steady force.

inputs:enabled

bool

True

Y

Enable or disable this ForceField. Overrides all other settings.

inputs:execution

execution

0

Y

Connection to evaluate this node.

inputs:inverseSquare

float

0.0

Y

inverseSquare sets a force that varies with the reciprocal of the square of the distance to the center.

inputs:linear

float

0.0

Y

linear sets a force that varies with distance to the center.

inputs:position

pointd[3]

[0.0, 0.0, 0.0]

Y

The location of the force field.

inputs:primPaths

token[]

[]

Y

Apply forces to this list of Prims. Must be rigid bodies for the forces to have any effect.

inputs:range

float[2]

[-1.0, -1.0]

Y

Forces are not applied when the distance to the force field is outside of this (minimum, maximum) range. Each force field can have a different definition of distance, e.g. for a spherical fore field, the distance is to the center, for a plane, the distance is to the closest point on the surface, for a line, it is to the closest point on the line. The minimum or maximum range is ignored if the value is negative.

inputs:shape

token[]

[]

Y

Derive the position input from this prim instead.

inputs:spinAxis

normalf[3]

[0.0, 0.0, 0.0]

Y

The axis around which rigid bodies are rotated in world coordinates.

inputs:surfaceAreaScaleEnabled

bool

True

Y

Enable or disable scaling of forces by the surface area that faces in the direction of the applied force.

inputs:surfaceSampleDensity

float

0.0

Y

Number of rays to cast per square unit of cross sectional area. When Surface Sample Density is disabled, by setting this value to 0, all forces act through the Center of Mass of the Rigid Body and no rotational torques will be applied. Any positive value will enable Surface Sampling. Ray casts are performed against the Collision Object of the Rigid Body in order to apply forces on the surface along the direction of the surface normal. This will apply torques on the Rigid Body that will induce rotation. Higher densities will cast more rays over the surface and spread the same force over the surface area. More ray casts will generate more accurate forces and torques, but will take additional compute time.