fix dice for collision shapes, add angular velocity

This commit is contained in:
Philip Rosedale 2015-02-24 11:55:41 -08:00
parent 9d021a1a1e
commit 573390b429

View file

@ -53,8 +53,10 @@ function shootDice(position, velocity) {
position: position,
velocity: velocity,
rotation: Quat.fromPitchYawRollDegrees(Math.random() * 360, Math.random() * 360, Math.random() * 360),
angularVelocity: { x: Math.random() * 100, y: Math.random() * 100, z: Math.random() * 100 },
lifetime: LIFETIME,
gravity: { x: 0, y: GRAVITY, z: 0 },
shapeType: "box",
collisionsWillMove: true
}));
position = Vec3.sum(position, Vec3.multiply(DIE_SIZE, Vec3.normalize(Quat.getRight(Camera.getOrientation()))));