mirror of
https://github.com/overte-org/overte.git
synced 2025-04-16 22:06:18 +02:00
Merge pull request #6504 from imgntn/bubblemaster
Update master reset scripts for Toybox to have parity with bubble wand
This commit is contained in:
commit
ea831238e6
2 changed files with 29 additions and 20 deletions
|
@ -991,17 +991,19 @@
|
|||
}
|
||||
|
||||
function createWand(position) {
|
||||
var WAND_MODEL = 'http://hifi-public.s3.amazonaws.com/models/bubblewand/wand.fbx';
|
||||
var WAND_COLLISION_SHAPE = 'http://hifi-public.s3.amazonaws.com/models/bubblewand/actual_no_top_collision_hull.obj';
|
||||
var entity = Entities.addEntity({
|
||||
var WAND_MODEL = 'http://hifi-content.s3.amazonaws.com/james/bubblewand/wand.fbx';
|
||||
var WAND_COLLISION_SHAPE = 'http://hifi-content.s3.amazonaws.com/james/bubblewand/wand_collision_hull.obj';
|
||||
|
||||
var wand = Entities.addEntity({
|
||||
name: 'Bubble Wand',
|
||||
type: "Model",
|
||||
modelURL: WAND_MODEL,
|
||||
shapeType: 'compound',
|
||||
position: position,
|
||||
gravity: {
|
||||
x: 0,
|
||||
y: -9.8,
|
||||
z: 0
|
||||
z: 0,
|
||||
},
|
||||
dimensions: {
|
||||
x: 0.05,
|
||||
|
@ -1009,24 +1011,27 @@
|
|||
z: 0.05
|
||||
},
|
||||
//must be enabled to be grabbable in the physics engine
|
||||
shapeType: 'compound',
|
||||
collisionsWillMove: true,
|
||||
compoundShapeURL: WAND_COLLISION_SHAPE,
|
||||
//Look into why bubble wand is going through table when gravity is enabled
|
||||
// gravity: {x: 0, y: -3.5, z: 0},
|
||||
// velocity: {x: 0, y: -0.01, z:0},
|
||||
script: wandScriptURL,
|
||||
userData: JSON.stringify({
|
||||
resetMe: {
|
||||
resetMe: true
|
||||
},
|
||||
grabbableKey: {
|
||||
invertSolidWhileHeld: true
|
||||
invertSolidWhileHeld: true,
|
||||
spatialKey: {
|
||||
relativePosition: {
|
||||
x: 0,
|
||||
y: 0.1,
|
||||
z: 0
|
||||
},
|
||||
relativeRotation: Quat.fromPitchYawRollDegrees(0, 0, 90)
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
function createBasketBall(position) {
|
||||
|
|
|
@ -971,18 +971,19 @@ MasterReset = function() {
|
|||
}
|
||||
|
||||
function createWand(position) {
|
||||
var WAND_MODEL = 'http://hifi-public.s3.amazonaws.com/models/bubblewand/wand.fbx';
|
||||
var WAND_COLLISION_SHAPE = 'http://hifi-public.s3.amazonaws.com/models/bubblewand/actual_no_top_collision_hull.obj';
|
||||
var WAND_MODEL = 'http://hifi-content.s3.amazonaws.com/james/bubblewand/wand.fbx';
|
||||
var WAND_COLLISION_SHAPE = 'http://hifi-content.s3.amazonaws.com/james/bubblewand/wand_collision_hull.obj';
|
||||
|
||||
var entity = Entities.addEntity({
|
||||
var wand = Entities.addEntity({
|
||||
name: 'Bubble Wand',
|
||||
type: "Model",
|
||||
modelURL: WAND_MODEL,
|
||||
shapeType: 'compound',
|
||||
position: position,
|
||||
gravity: {
|
||||
x: 0,
|
||||
y: -9.8,
|
||||
z: 0
|
||||
z: 0,
|
||||
},
|
||||
dimensions: {
|
||||
x: 0.05,
|
||||
|
@ -990,24 +991,27 @@ MasterReset = function() {
|
|||
z: 0.05
|
||||
},
|
||||
//must be enabled to be grabbable in the physics engine
|
||||
shapeType: 'compound',
|
||||
collisionsWillMove: true,
|
||||
compoundShapeURL: WAND_COLLISION_SHAPE,
|
||||
//Look into why bubble wand is going through table when gravity is enabled
|
||||
// gravity: {x: 0, y: -3.5, z: 0},
|
||||
// velocity: {x: 0, y: -0.01, z:0},
|
||||
script: wandScriptURL,
|
||||
userData: JSON.stringify({
|
||||
resetMe: {
|
||||
resetMe: true
|
||||
},
|
||||
grabbableKey: {
|
||||
invertSolidWhileHeld: true
|
||||
invertSolidWhileHeld: true,
|
||||
spatialKey: {
|
||||
relativePosition: {
|
||||
x: 0,
|
||||
y: 0.1,
|
||||
z: 0
|
||||
},
|
||||
relativeRotation: Quat.fromPitchYawRollDegrees(0, 0, 90)
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
function createBasketBall(position) {
|
||||
|
|
Loading…
Reference in a new issue