mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-18 22:08:47 +02:00
Change the velocity filter to 5
This commit is contained in:
parent
3a17a64c99
commit
0e16686fb8
1 changed files with 7 additions and 7 deletions
|
@ -13,18 +13,18 @@ function filter(p) {
|
||||||
/* Reject if modifications made to Model properties */
|
/* Reject if modifications made to Model properties */
|
||||||
if (p.modelURL || p.compoundShapeURL || p.shape || p.shapeType || p.url || p.fps || p.currentFrame || p.running || p.loop || p.firstFrame || p.lastFrame || p.hold || p.textures || p.xTextureURL || p.yTextureURL || p.zTextureURL) { return false; }
|
if (p.modelURL || p.compoundShapeURL || p.shape || p.shapeType || p.url || p.fps || p.currentFrame || p.running || p.loop || p.firstFrame || p.lastFrame || p.hold || p.textures || p.xTextureURL || p.yTextureURL || p.zTextureURL) { return false; }
|
||||||
|
|
||||||
/* Clamp velocity to 10 units/second. Zeroing each component of acceleration keeps us from slamming.*/
|
/* Clamp velocity to 5 units/second. Zeroing each component of acceleration keeps us from slamming.*/
|
||||||
if (p.velocity) {
|
if (p.velocity) {
|
||||||
if (p.velocity.x > 10) {
|
if (p.velocity.x > 5) {
|
||||||
p.velocity.x = 10;
|
p.velocity.x = 5;
|
||||||
p.acceleration.x = 0;
|
p.acceleration.x = 0;
|
||||||
}
|
}
|
||||||
if (p.velocity.y > 10) {
|
if (p.velocity.y > 5) {
|
||||||
p.velocity.y = 10;
|
p.velocity.y = 5;
|
||||||
p.acceleration.y = 0;
|
p.acceleration.y = 0;
|
||||||
}
|
}
|
||||||
if (p.velocity.z > 10) {
|
if (p.velocity.z > 5) {
|
||||||
p.velocity.z = 10;
|
p.velocity.z = 5;
|
||||||
p.acceleration.z = 0;
|
p.acceleration.z = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue