mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-19 12:05:32 +02:00
avoid a rare script-crash
This commit is contained in:
parent
ec687bdb4b
commit
37233b9fdb
1 changed files with 4 additions and 0 deletions
|
@ -447,6 +447,10 @@ Grabber.prototype.moveEvent = function(event) {
|
|||
|
||||
// see if something added/restored gravity
|
||||
var entityProperties = Entities.getEntityProperties(this.entityID);
|
||||
if (!entityProperties || !entityProperties.gravity) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Vec3.length(entityProperties.gravity) !== 0.0) {
|
||||
this.originalGravity = entityProperties.gravity;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue