What are the scripting commands for the collisions?


#1

The collision stuff cool, as example , position: , dimensions: , color: wich one for the collision settings ? To clarify it more , the scripting commands for this 3 options.


#4

@thoys, heres the script im useing right now.

var pitch = 90.0;
var yaw = 0.0;
var roll = 180.0;
var rotation = Quat.fromPitchYawRollDegrees(pitch, yaw, roll)

var originalProperties = {
   type: "Sphere",
   position: { x: 196.0,
               y: 162.0,
               z: 212.0 },

   radius : 1.00,
    
    dimensions: {     x: 1.0,
                        y: 1.0,
                        z: 1.0 },            

   color: { red: 0,
             green: 0,
             blue: 255 },
    
   rotation: rotation,
     
    velocity: { x: 2.0,
                    y: 0,
                    z: 0 },
                     
    damping: -0.5,
     
    angulardamping: 0,
     
    mass: 1.000,
    ignoreForCollisions: false,
    collisionsWillMove: true,
     
};

var positionDelta = { x: 0.000, y: 0.000, z: -0.05 };
var entityID = Entities.addEntity(originalProperties);

Corrected collisionWillMove into collisionsWillMove after toys found it.
Thanks @thoys. for the few hints and corrections.