mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 16:33:56 +02:00
single spawner tank
This commit is contained in:
parent
19a8fa82e3
commit
774cf8f42f
3 changed files with 19 additions and 2 deletions
|
@ -26,6 +26,7 @@
|
|||
|
||||
collisionWithEntity: function(myID, otherID, collisionInfo) {
|
||||
var otherProps = Entities.getEntityProperties(otherID);
|
||||
|
||||
if (otherProps.name = "hifi-home-dressing-room-transformer-collider" && _this.locked === false) {
|
||||
var myProps = Entities.getEntityProperties(myID);
|
||||
var distance = Vec3.distance(myProps.position, otherProps.position);
|
||||
|
@ -131,6 +132,7 @@
|
|||
delete littleVersionProps.localPosition;
|
||||
delete littleVersionProps.localRotation;
|
||||
delete littleVersionProps.naturalPosition;
|
||||
// delete littleVersionProps.script;
|
||||
|
||||
var userData = JSON.parse(littleVersionProps.userData);
|
||||
var basePosition = userData["hifiHomeTransformerKey"].basePosition;
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
var TRANSFORMER_SCRIPT = Script.resolvePath('transformer.js?' + Math.random());
|
||||
|
||||
var AVATAR_COLLISION_HULL='http://hifi-content.s3.amazonaws.com/DomainContent/Home/dressingRoom/Avatar-Hull.obj';
|
||||
// var SHRINK_AMOUNT = 1 / 2;
|
||||
TransformerDoll = function(modelURL, spawnPosition, spawnRotation, dimensions) {
|
||||
print('SCRIPT REF AT TRANSFORMER CREATE::' + TRANSFORMER_SCRIPT);
|
||||
var transformerProps = {
|
||||
name: 'hifi-home-dressing-room-little-transformer',
|
||||
type: 'Model',
|
||||
shapeType: 'box',
|
||||
shapeType: 'compound',
|
||||
compoundShapeURL:AVATAR_COLLISION_HULL,
|
||||
position: spawnPosition,
|
||||
rotation: Quat.fromPitchYawRollDegrees(spawnRotation.x, spawnRotation.y, spawnRotation.z),
|
||||
modelURL: modelURL,
|
||||
|
@ -15,7 +18,7 @@
|
|||
y: -5,
|
||||
z: 0
|
||||
},
|
||||
visible: false,
|
||||
visible: true,
|
||||
damping: 0.8,
|
||||
userData: JSON.stringify({
|
||||
'grabbableKey': {
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
var fishTankPath = Script.resolvePath('wrapper.js?' + Math.random());
|
||||
Script.include(fishTankPath);
|
||||
var center = Vec3.sum(Vec3.sum(MyAvatar.position, {
|
||||
x: 0,
|
||||
y: 0.5,
|
||||
z: 0
|
||||
}), Vec3.multiply(0.5, Quat.getFront(Camera.getOrientation())));
|
||||
var fishTank = new FishTank(center, {
|
||||
x: 0,
|
||||
y: 123,
|
||||
z: 0
|
||||
});
|
Loading…
Reference in a new issue