mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 03:48:38 +02:00
Adjust bow gravity and position/rotation
This commit is contained in:
parent
efa39dce2e
commit
3e3ca6596e
2 changed files with 4 additions and 3 deletions
|
@ -120,7 +120,7 @@ function getControllerLocation(controllerHand) {
|
||||||
const ARROW_TIP_OFFSET = 0.47;
|
const ARROW_TIP_OFFSET = 0.47;
|
||||||
const ARROW_GRAVITY = {
|
const ARROW_GRAVITY = {
|
||||||
x: 0,
|
x: 0,
|
||||||
y: -4.8,
|
y: -9.8,
|
||||||
z: 0
|
z: 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ var id = Entities.addEntity({
|
||||||
"dynamic": 1,
|
"dynamic": 1,
|
||||||
"gravity": {
|
"gravity": {
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": -1,
|
"y": -9.8,
|
||||||
"z": 0
|
"z": 0
|
||||||
},
|
},
|
||||||
"modelURL": Script.resolvePath("bow-deadly.fbx"),
|
"modelURL": Script.resolvePath("bow-deadly.fbx"),
|
||||||
|
@ -52,7 +52,8 @@ var id = Entities.addEntity({
|
||||||
"script": Script.resolvePath("bow.js") + "?" + Date.now(),
|
"script": Script.resolvePath("bow.js") + "?" + Date.now(),
|
||||||
"shapeType": "compound",
|
"shapeType": "compound",
|
||||||
"type": "Model",
|
"type": "Model",
|
||||||
"userData": JSON.stringify(userData),
|
//"userData": JSON.stringify(userData),
|
||||||
|
"userData": "{\"grabbableKey\":{\"grabbable\":true},\"wearable\":{\"joints\":{\"RightHand\":[{\"x\":0.0813,\"y\":0.0452,\"z\":0.0095},{\"x\":-0.3946,\"y\":-0.6604,\"z\":0.4748,\"w\":-0.4275}],\"LeftHand\":[{\"x\":-0.0881,\"y\":0.0259,\"z\":0.0159},{\"x\":0.4427,\"y\":-0.6519,\"z\":0.4592,\"w\":0.4099}]}}}"
|
||||||
lifetime: 600
|
lifetime: 600
|
||||||
});
|
});
|
||||||
print("Created bow:", id);
|
print("Created bow:", id);
|
||||||
|
|
Loading…
Reference in a new issue