mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-06 03:54:25 +02:00
fix dice for collision shapes, add angular velocity
This commit is contained in:
parent
9d021a1a1e
commit
573390b429
1 changed files with 2 additions and 0 deletions
|
@ -53,8 +53,10 @@ function shootDice(position, velocity) {
|
||||||
position: position,
|
position: position,
|
||||||
velocity: velocity,
|
velocity: velocity,
|
||||||
rotation: Quat.fromPitchYawRollDegrees(Math.random() * 360, Math.random() * 360, Math.random() * 360),
|
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,
|
lifetime: LIFETIME,
|
||||||
gravity: { x: 0, y: GRAVITY, z: 0 },
|
gravity: { x: 0, y: GRAVITY, z: 0 },
|
||||||
|
shapeType: "box",
|
||||||
collisionsWillMove: true
|
collisionsWillMove: true
|
||||||
}));
|
}));
|
||||||
position = Vec3.sum(position, Vec3.multiply(DIE_SIZE, Vec3.normalize(Quat.getRight(Camera.getOrientation()))));
|
position = Vec3.sum(position, Vec3.multiply(DIE_SIZE, Vec3.normalize(Quat.getRight(Camera.getOrientation()))));
|
||||||
|
|
Loading…
Reference in a new issue