mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 06:18:52 +02:00
Merge pull request #6419 from imgntn/betterbubbles
Improvments to Bubblewand
This commit is contained in:
commit
a59dc6a423
2 changed files with 27 additions and 15 deletions
|
@ -12,8 +12,8 @@
|
||||||
|
|
||||||
Script.include("../../libraries/utils.js");
|
Script.include("../../libraries/utils.js");
|
||||||
|
|
||||||
var WAND_MODEL = 'http://hifi-public.s3.amazonaws.com/models/bubblewand/wand.fbx';
|
var WAND_MODEL = 'http://hifi-content.s3.amazonaws.com/james/bubblewand/wand.fbx';
|
||||||
var WAND_COLLISION_SHAPE = 'http://hifi-public.s3.amazonaws.com/models/bubblewand/actual_no_top_collision_hull.obj';
|
var WAND_COLLISION_SHAPE = 'http://hifi-content.s3.amazonaws.com/james/bubblewand/wand_collision_hull.obj';
|
||||||
|
|
||||||
var WAND_SCRIPT_URL = Script.resolvePath("wand.js");
|
var WAND_SCRIPT_URL = Script.resolvePath("wand.js");
|
||||||
|
|
||||||
|
@ -43,5 +43,18 @@ var wand = Entities.addEntity({
|
||||||
//must be enabled to be grabbable in the physics engine
|
//must be enabled to be grabbable in the physics engine
|
||||||
collisionsWillMove: true,
|
collisionsWillMove: true,
|
||||||
compoundShapeURL: WAND_COLLISION_SHAPE,
|
compoundShapeURL: WAND_COLLISION_SHAPE,
|
||||||
script: WAND_SCRIPT_URL
|
script: WAND_SCRIPT_URL,
|
||||||
|
userData: JSON.stringify({
|
||||||
|
grabbableKey: {
|
||||||
|
invertSolidWhileHeld: true,
|
||||||
|
spatialKey: {
|
||||||
|
relativePosition: {
|
||||||
|
x: 0,
|
||||||
|
y: 0.1,
|
||||||
|
z: 0
|
||||||
|
},
|
||||||
|
relativeRotation: Quat.fromPitchYawRollDegrees(0, 0, 90)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
});
|
});
|
|
@ -162,7 +162,7 @@
|
||||||
position: this.getWandTipPosition(properties),
|
position: this.getWandTipPosition(properties),
|
||||||
dimensions: BUBBLE_INITIAL_DIMENSIONS,
|
dimensions: BUBBLE_INITIAL_DIMENSIONS,
|
||||||
collisionsWillMove: false,
|
collisionsWillMove: false,
|
||||||
ignoreForCollisions: false,
|
ignoreForCollisions: true,
|
||||||
linearDamping: BUBBLE_LINEAR_DAMPING,
|
linearDamping: BUBBLE_LINEAR_DAMPING,
|
||||||
shapeType: "sphere"
|
shapeType: "sphere"
|
||||||
});
|
});
|
||||||
|
@ -179,7 +179,6 @@
|
||||||
//only get the properties that we need
|
//only get the properties that we need
|
||||||
var properties = Entities.getEntityProperties(this.entityID, ["position", "rotation"]);
|
var properties = Entities.getEntityProperties(this.entityID, ["position", "rotation"]);
|
||||||
|
|
||||||
|
|
||||||
var wandTipPosition = this.getWandTipPosition(properties);
|
var wandTipPosition = this.getWandTipPosition(properties);
|
||||||
|
|
||||||
//update the bubble to stay with the wand tip
|
//update the bubble to stay with the wand tip
|
||||||
|
|
Loading…
Reference in a new issue