mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:24:00 +02:00
I was told there would be no math
This commit is contained in:
parent
b8565358ff
commit
40aecf3bf4
1 changed files with 2 additions and 5 deletions
|
@ -54,12 +54,9 @@ function setEnergy(energy) {
|
|||
function avatarAccelerationEnergy() {
|
||||
var AVATAR_MOVEMENT_ENERGY_CONSTANT = 0.001;
|
||||
var velocity = MyAvatar.getVelocity();
|
||||
var dV = Vec3.subtract(velocity, lastAvatarVelocity);
|
||||
var dE = Vec3.length(lastAvatarVelocity) * Vec3.length(dV) * AVATAR_MOVEMENT_ENERGY_CONSTANT;
|
||||
var dV = Math.abs(Vec3.length(velocity) - Vec3.length(lastAvatarVelocity));
|
||||
var dE = Vec3.length(lastAvatarVelocity) * dV * AVATAR_MOVEMENT_ENERGY_CONSTANT;
|
||||
lastAvatarVelocity = velocity;
|
||||
if (dE > 0.01) {
|
||||
print("de " + dE);
|
||||
}
|
||||
return dE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue