Platforms to show: All Mac Windows Linux Cross-Platform
Back to SCNNodeMBS class.
SCNNodeMBS.addAudioPlayer(player as SCNAudioPlayerMBS)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | SceneKit | MBS Mac64bit Plugin | 22.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
player: An audio player object.
Positional audio effects from a player attached to a node are based on that node’s position relative to the audioListener position in the scene.
After playback has completed, SceneKit automatically removes the audio player from the node.
You may need to have the scene/view in play mode to hear something.
SCNNodeMBS.addChildNode(node as SCNNodeMBS)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | SceneKit | MBS Mac64bit Plugin | 18.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
child: The node to be added.
Calling this method appends the node to the end of the childNodes array.
Some examples using this method:
- /Mac64bit/SceneKit/Camera
- /Mac64bit/SceneKit/Free form
- /Mac64bit/SceneKit/Physics
- /Mac64bit/SceneKit/Rotation
- /Mac64bit/SceneKit/SceneKit Hanoi
- /Mac64bit/SceneKit/SceneKit Images
- /Mac64bit/SceneKit/SceneKit iOS
- /Mac64bit/SceneKit/SceneKit Primitives
- /Mac64bit/SceneKit/SceneKit Spheres
- /Mac64bit/SceneKit/Triangle Demo
SCNNodeMBS.audioPlayers as SCNAudioPlayerMBS()
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | SceneKit | MBS Mac64bit Plugin | 22.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Positional audio effects from a player attached to a node are based on that node’s position relative to the audioListener position in the scene.
After an audio player completes playback, SceneKit automatically removes it from the node. Therefore, this array always contains audio players that are currently playing back audio.
SCNNodeMBS.flattenedClone as SCNNodeMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | SceneKit | MBS Mac64bit Plugin | 19.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
A new single node containing the combined geometries and materials of the node and its child node subtree.
Rendering complex node hierarchies can incur a performance cost. Each geometry and material requires a separate draw command to be sent to the GPU, and each draw command comes with a performance overhead. If you plan for a portion of your scene’s node hierarchy to remain static (with respect to itself, if not the rest of the scene), use this method to create a single node containing all elements of that node hierarchy that SceneKit can render using fewer draw commands.
SCNNodeMBS.hitTestWithSegment(PointA as SCNVector3MBS, PointB as SCNVector3MBS, Options as Dictionary = nil) as SCNHitTestResultMBS()
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | SceneKit | MBS Mac64bit Plugin | 20.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
pointA: An endpoint of the line segment to search along, specified in the node’s local coordinate system.
pointB: The other endpoint of the line segment to search along, specified in the node’s local coordinate system.
options: A dictionary of options affecting the search. See Key shared methods in SCNHitTestResultMBS class for acceptable values.
Returns an array of SCNHitTestResultMBS objects representing search results.
Hit-testing is the process of finding elements of a scene located along a specified line segment in the scene’s coordinate space (or that of a particular node in the scene). For example, you can use this method to determine whether a projectile launched by a game character will hit its target.
To search for the scene element corresponding to a two-dimensional point in the rendered image, use the renderer’s hitTest method instead.
SCNNodeMBS.insertChildNode(newNode as SCNNodeMBS, atIndex as Integer)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | SceneKit | MBS Mac64bit Plugin | 18.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
SCNNodeMBS.localRotateBy(rotation as SCNVector4MBS)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | SceneKit | MBS Mac64bit Plugin | 19.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
rotation: The axis and angle of rotation to apply, in node-local space, expressed as a quaternion.
This method rotates the node according to its pivot transform.
The effects of this method are animatable; that is, calling this method during an implicit-animation transaction animates the rotation effect.
Available in macOS 10.13 or later.
SCNNodeMBS.localTranslateBy(translation as SCNVector3MBS)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | SceneKit | MBS Mac64bit Plugin | 19.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
translation: The distance, in node-local space, by which to move the node.
The effects of this method are animatable; that is, calling this method during an implicit-animation transaction animates the move.
Available in macOS 10.13 or later.
SCNNodeMBS.lookAt(worldTarget as SCNVector3MBS)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | SceneKit | MBS Mac64bit Plugin | 19.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
worldTarget: The point, in world space, to face the node toward.
Using this method is equivalent to calling the other lookAt method and passing the node's worldUp and localFront vectors for the corresponding parameters.
The effects of this method are animatable; that is, calling this method during an implicit-animation transaction animates the rotation effect.
Available in macOS 10.13 or later.
See also:
SCNNodeMBS.lookAt(worldTarget as SCNVector3MBS, worldUp as SCNVector3MBS, localFront as SCNVector3MBS)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | SceneKit | MBS Mac64bit Plugin | 19.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
worldTarget: The point, in world space, to face the node toward.
worldUp: The direction vector, in world space, that should appear as "up" from the rotated node's point of view.
localFront: The direction vector, in the node's local space, that should orient toward the target point.
The effects of this method are animatable; that is, calling this method during an implicit-animation transaction animates the rotation effect.
Available in macOS 10.13 or later.
See also:
SCNNodeMBS.setConstraints(constraints() as SCNConstraintMBS)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | SceneKit | MBS Mac64bit Plugin | 19.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
An array of constraint objects. Before rendering, SceneKit evaluates all constraints attached to a node hierarchy and adjusts node transformations appropriately.
Use the SCNLookAtConstraintMBS class to make a node always point toward another node even as both are moved, or the SCNTransformConstraintMBS class to apply arbitrary transformations at constraint evaluation time.
Some examples using this method:
The items on this page are in the following plugins: MBS Mac64bit Plugin.