mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 13:43:49 +02:00
Fix gravity for dynamic entities
This commit is contained in:
parent
c25b87c33f
commit
344ec25bcd
1 changed files with 8 additions and 1 deletions
|
@ -207,7 +207,14 @@ ScrollingWindow {
|
|||
} else if (url) {
|
||||
var name = assetProxyModel.data(treeView.selection.currentIndex);
|
||||
var addPosition = Vec3.sum(MyAvatar.position, Vec3.multiply(2, Quat.getFront(MyAvatar.orientation)));
|
||||
var gravity = dynamic ? { x: 0, y: -10, z: 0 } : { x: 0, y: 0, z: 0 };
|
||||
var gravity;
|
||||
if (dynamic) {
|
||||
// Create a vector <0, -10, 0>. { x: 0, y: -10, z: 0 } won't work because Qt is dumb and this is a
|
||||
// different scripting engine from QTScript.
|
||||
gravity = Vec3.multiply(Vec3.fromPolar(Math.PI / 2, 0), 10);
|
||||
} else {
|
||||
gravity = { x: 0, y: 0, z: 0 };
|
||||
}
|
||||
|
||||
print("Asset browser - adding asset " + url + " (" + name + ") to world.");
|
||||
|
||||
|
|
Loading…
Reference in a new issue