mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 15:32:40 +02:00
Merge pull request #10545 from ctrlaltdavid/21352
Fix rotation axes of stopwatch hands
This commit is contained in:
commit
a186d4f5e7
1 changed files with 5 additions and 4 deletions
|
@ -67,11 +67,11 @@
|
|||
self.tickIntervalID = null;
|
||||
}
|
||||
Entities.editEntity(self.secondHandID, {
|
||||
rotation: Quat.fromPitchYawRollDegrees(0, 0, 0),
|
||||
localRotation: Quat.fromPitchYawRollDegrees(0, 0, 0),
|
||||
angularVelocity: { x: 0, y: 0, z: 0 },
|
||||
});
|
||||
Entities.editEntity(self.minuteHandID, {
|
||||
rotation: Quat.fromPitchYawRollDegrees(0, 0, 0),
|
||||
localRotation: Quat.fromPitchYawRollDegrees(0, 0, 0),
|
||||
angularVelocity: { x: 0, y: 0, z: 0 },
|
||||
});
|
||||
self.isActive = false;
|
||||
|
@ -100,11 +100,12 @@
|
|||
seconds++;
|
||||
const degreesPerTick = -360 / 60;
|
||||
Entities.editEntity(self.secondHandID, {
|
||||
rotation: Quat.fromPitchYawRollDegrees(0, seconds * degreesPerTick, 0),
|
||||
localRotation: Quat.fromPitchYawRollDegrees(0, seconds * degreesPerTick, 0),
|
||||
});
|
||||
|
||||
if (seconds % 60 == 0) {
|
||||
Entities.editEntity(self.minuteHandID, {
|
||||
rotation: Quat.fromPitchYawRollDegrees(0, (seconds / 60) * degreesPerTick, 0),
|
||||
localRotation: Quat.fromPitchYawRollDegrees(0, (seconds / 60) * degreesPerTick, 0),
|
||||
});
|
||||
Audio.playSound(self.chimeSound, {
|
||||
position: self.getStopwatchPosition(),
|
||||
|
|
Loading…
Reference in a new issue