mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:29:32 +02:00
fix for submerge in floor issue
This commit is contained in:
parent
d726bd352d
commit
2ca4203d85
1 changed files with 6 additions and 6 deletions
|
@ -102,16 +102,16 @@
|
||||||
var success = Clipboard.importEntities(PHOTOBOOTH_SETUP_JSON_URL);
|
var success = Clipboard.importEntities(PHOTOBOOTH_SETUP_JSON_URL);
|
||||||
var frontFactor = 10;
|
var frontFactor = 10;
|
||||||
// getForward is preffered as getFront function is deprecated
|
// getForward is preffered as getFront function is deprecated
|
||||||
var frontUnitVec = (typeof Quat.getForward === "undefined") ? Vec3.normalize(Quat.getFront(MyAvatar.orientation)) : Vec3.normalize(Quat.getForward(MyAvatar.orientation));
|
var frontUnitVec = Vec3.normalize(Quat.getFront(MyAvatar.orientation));
|
||||||
var frontOffset = Vec3.multiply(frontUnitVec,frontFactor);
|
var frontOffset = Vec3.multiply(frontUnitVec,frontFactor);
|
||||||
var rightFactor = 3;
|
var upFactor = 3;
|
||||||
var rightUnitVec = Vec3.normalize(Quat.getRight(MyAvatar.orientation));
|
var upUnitVec = Vec3.normalize(Quat.getUp(MyAvatar.orientation));
|
||||||
var rightOffset = Vec3.multiply(rightUnitVec,rightFactor);
|
var upOffset = Vec3.multiply(upUnitVec, upFactor);
|
||||||
var spawnLocation = Vec3.sum(Vec3.sum(MyAvatar.position,frontOffset),rightOffset);
|
var spawnLocation = Vec3.sum(MyAvatar.position,frontOffset);
|
||||||
|
spawnLocation = Vec3.sum(spawnLocation, upOffset);
|
||||||
if (success) {
|
if (success) {
|
||||||
this.pastedEntityIDs = Clipboard.pasteEntities(spawnLocation);
|
this.pastedEntityIDs = Clipboard.pasteEntities(spawnLocation);
|
||||||
this.processPastedEntities();
|
this.processPastedEntities();
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue