mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-07 20:22:27 +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,
|
||||
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()))));
|
||||
|
|
Loading…
Reference in a new issue