Force Field: Conical

A conical force field that attracts and/or repels rigid bodies from a central point depending on the function coefficients. Positive values attract and negative values repel. The net force on the rigid body is calculated using f = constant + linear ‘*’ r + inverseSquare / r^2, where r is the distance to the center. Forces can be attenuated based on their position relative to the cone central axis with the linearFalloff and powerFalloff inputs.

The conical force field is very similar to the spherical force field. It attracts or repels objects to a central point while it is enabled. The difference is that an angular limit can be set, past which no forces are applied. The forces can also be ramped down as the angular limit is approached. The following list of properties are available.

Installation

To use this Node, you must enable omni.physx.forcefields in the Extension Manager.

Inputs

Name

Type

Description

Default

execution

execution

Connection to evaluate this node.

0

primPaths

token[]

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

enabled

bool

Enable or disable this ForceField. Overrides all other settings.

True

position

pointd[3]

The location of the force field.

[0.0, 0.0, 0.0]

range

float[2]

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 conical 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.

[-1.0, -1.0]

surfaceSampleDensity

float

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.

0.0

surfaceAreaScaleEnabled

bool

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

True

angle

float

Angle from the central axis of the cone to the surface that defines the extents of the cone.

0.0

direction

normalf[3]

The direction vector of the central axis of the cone.

shape

token[]

Derive position, direction and angle inputs from this prim instead.

constant

float

constant applies a steady force.

0.0

linear

float

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

0.0

inverseSquare

float

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

0.0

linearFalloff

float

ramp down forces linearly with the angle from the central axis. set linearFalloff to 0.0 to disable. linearFalloff is the percentage of the force remaining at the cone angle extents (>0.0 to 1.0).

0.0

powerFalloff

float

ramp down forces dramatically with the angle from the central axis. set powerFalloff to 0.0 to disable. >0.0 to 1.0: decay more as this angle increases. 1.0 and greater: decay more as the angle apporaches the cone angle limit.

0.0