Platforms to show: All Mac Windows Linux Cross-Platform

Back to SCNPhysicsFieldMBS class.

SCNPhysicsFieldMBS.Active as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SceneKit MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A Boolean value that determines whether the field’s effect is enabled.

If this value is fasle, the field does not apply forces to physics bodies in its area of effect. The default value is true.
Use this property, for example, to switch fields on and off as a gameplay mechanic.
(Read and Write property)

SCNPhysicsFieldMBS.CategoryBitMask as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SceneKit MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A mask that defines which categories this physics field belongs to.

To determine whether a field affects a physics body, SceneKit performs a bitwise AND operation on the field’s category bit mask and the body’s categoryBitMask property. If the result is a nonzero value, SceneKit computes and applies the force of the field on the body. To determine whether a field affects the particles spawned by an SCNParticleSystemMBS object, SceneKit performs the same check using the categoryBitMask property of the node containing the particle system.
Use this property to create fields which affect only certain bodies in your scene. Reducing the number of bodies affected by fields can also improve simulation performance.
(Read and Write property)

SCNPhysicsFieldMBS.direction as SCNVector3MBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SceneKit MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The field’s directional axis.

Some types of fields apply forces whose direction or magnitude is relative to an axis. (For details on each type of field, see the methods listed in Creating Physics Fields.) Changing the direction changes the effects of these field types.

The default direction is the vector {0, -1, 0}. With this direction, for example, linear gravity fields whose strength is positive cause objects to fall in the “down” direction of scene space.
(Read and Write property)

SCNPhysicsFieldMBS.Exclusive as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SceneKit MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A Boolean value that determines whether the field overrides other fields whose areas of effect it overlaps.

If this value is true and a physics body is within this field’s region, SceneKit ignores the effects of all other fields that might otherwise affect the body. The default value is false.
If you set this property to true on multiple fields in a scene, their regions should not overlap. If they do, the results are undefined.
(Read and Write property)

SCNPhysicsFieldMBS.falloffExponent as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SceneKit MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
An exponent that determines how the field’s strength diminishes with distance.

When SceneKit calculates the force to be applied by a field, it attenuates the field’s effect by multiplying with the expression pow(distance - minRadius, -falloff). If the falloff exponent is greater than zero, the field’s effect is stronger on nearby bodies than on bodies farther away from its location.
The default falloff exponent varies by field type. For details, see the methods listed in Creating Physics Fields.
(Read and Write property)

SCNPhysicsFieldMBS.halfExtent as SCNVector3MBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SceneKit MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A location marking the end of the field’s area of effect.

To define a field’s area of effect, use the position property of the node that contains the field and the field’s halfExtent property. The center of the area of effect is the node’s position. The half-extent, a position vector in the local coordinate space of the node containing the field, marks one corner of a box, and the negative of the half-extent vector marks the opposite corner of the box. For example, if a node’s position is the vector {2.0, 2.0, 2.0} and it contains a physics field whose half-extent is the vector {0.5, 0.5, 0.5}, the field’s area of effect is the box extending from 1.5 to 2.5 along each axis of the scene’s coordinate system.
By default, a field’s area of effect is the interior of this box shape. Use the usesEllipsoidalExtent property to instead make the area of effect an ellipsoid bounded by this box. Use the scope property to choose whether the area of effect is the interior or exterior of the box (or ellipsoid).
The default half-extent is the vector {INFINITY, INFINITY, INFINITY}, specifying that the field affects bodies located anywhere in the scene.
(Read and Write property)

SCNPhysicsFieldMBS.Handle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SceneKit MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Internal object reference.

(Read and Write property)

SCNPhysicsFieldMBS.minimumDistance as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SceneKit MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The minimum value for distance-based effects.

This property determines the beginning of the field’s falloff area. At distances less than the minimum, the field’s effect is at full strength. At greater distances, the field’s effect diminishes based on the value of the falloffExponent property. The default minimum distance is a very small (but nonzero) value.
(Read and Write property)

SCNPhysicsFieldMBS.offset as SCNVector3MBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SceneKit MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The offset of the field’s center within its area of effect.

Some types of fields apply forces whose magnitude is relative to the distance between an object and the field’s center. (For details on each type of field, see the methods listed in Creating Physics Fields.) Changing the offset changes the effects of these field types.

With the default offset vector {0, 0, 0}, the center of a field is the center of its area of effect.
(Read and Write property)

SCNPhysicsFieldMBS.Scope as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SceneKit MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The area affected by the field, either inside or outside its region.

First, define a field’s region using its halfExtent property and the position property of the node containing the field. Then, use the scope property to choose whether the field’s area of effect is the interior of the region (the default) or all space outside the region.
(Read and Write property)

SCNPhysicsFieldMBS.strength as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SceneKit MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A multiplier for the force that the field applies to objects in its area of effect.

Each type of physics field defines its own behavior for strength values. For details, see the methods listed in Creating Physics Fields.
(Read and Write property)

SCNPhysicsFieldMBS.usesEllipsoidalExtent as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SceneKit MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A Boolean value that determines whether the field’s area of effect is shaped like a box or ellipsoid.

If this value is false (the default), the field’s area of effect is the box-shaped region of space defined by its halfExtent property and the position property of the node containing the field.

If this value is true, the field’s area of effect is the ellipsoid bounded by this box-shaped region. That is, if all components of the half-extent vector are equal, the field has a spherical area of effect.
(Read and Write property)

The items on this page are in the following plugins: MBS Mac64bit Plugin.


The biggest plugin in space...