2014-01-29 17:52:17 -08:00
|
|
|
//
|
|
|
|
// globalCollisionsExample.js
|
2014-04-08 17:58:02 -07:00
|
|
|
// examples
|
2014-01-29 17:52:17 -08:00
|
|
|
//
|
|
|
|
// Created by Brad Hefta-Gaub on 1/29/14.
|
2014-04-09 09:21:54 -07:00
|
|
|
// Copyright 2014 High Fidelity, Inc.
|
2014-01-29 17:52:17 -08:00
|
|
|
//
|
|
|
|
// This is an example script that demonstrates use of the Controller class
|
|
|
|
//
|
2014-04-08 18:00:24 -07:00
|
|
|
// Distributed under the Apache License, Version 2.0.
|
|
|
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
2014-01-29 17:52:17 -08:00
|
|
|
//
|
|
|
|
|
|
|
|
|
2014-03-05 15:03:54 -08:00
|
|
|
print("hello...");
|
|
|
|
|
2014-01-29 17:52:17 -08:00
|
|
|
|
2014-10-13 14:19:57 -07:00
|
|
|
function entityCollisionWithEntity(entityA, entityB, collision) {
|
|
|
|
print("entityCollisionWithParticle()..");
|
|
|
|
print(" entityA.getID()=" + entityA.id);
|
|
|
|
print(" entityB.getID()=" + entityB.id);
|
2014-04-07 10:03:10 -07:00
|
|
|
Vec3.print('penetration=', collision.penetration);
|
|
|
|
Vec3.print('contactPoint=', collision.contactPoint);
|
2014-01-29 17:52:17 -08:00
|
|
|
}
|
|
|
|
|
2014-10-13 14:19:57 -07:00
|
|
|
Entities.entityCollisionWithEntity.connect(entityCollisionWithEntity);
|
2014-03-05 15:03:54 -08:00
|
|
|
|
|
|
|
print("here... hello...");
|