Home Reference Source Repository
import SCNPhysicsContactDelegate from 'jscenekit/js/SceneKit/SCNPhysicsContactDelegate.js'
public interface | source

SCNPhysicsContactDelegate

Methods you can implement to respond when a contact or collision occurs between two physics bodies in a scene.

See:

Method Summary

Public Methods
public

Tells the delegate that two bodies have come into contact.

public

Tells the delegate that a contact has ended.

public

SceneKit calls this method on each step of the physics simulation (see the timeStep property) if information about the contact changes—for example, if two bodies are sliding against one another.

Public Methods

public physicsWorldDidBegin(world: SCNPhysicsWorld, contact: SCNPhysicsContact): void source

Tells the delegate that two bodies have come into contact.

Params:

NameTypeAttributeDescription
world SCNPhysicsWorld

The physics world that is processing the contact.

contact SCNPhysicsContact

An object that describes the contact.

Return:

void

See:

public physicsWorldDidEnd(world: SCNPhysicsWorld, contact: SCNPhysicsContact): void source

Tells the delegate that a contact has ended.

Params:

NameTypeAttributeDescription
world SCNPhysicsWorld

The physics world that is processing the contact.

contact SCNPhysicsContact

An object that describes the contact.

Return:

void

See:

public physicsWorldDidUpdate(world: SCNPhysicsWorld, contact: SCNPhysicsContact): void source

SceneKit calls this method on each step of the physics simulation (see the timeStep property) if information about the contact changes—for example, if two bodies are sliding against one another.

Params:

NameTypeAttributeDescription
world SCNPhysicsWorld

The physics world that is processing the contact.

contact SCNPhysicsContact

An object that describes the contact.

Return:

void

See: