mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
use correct capsule dimensions in teleport.js
This commit is contained in:
parent
6ecf850159
commit
b38c263e60
1 changed files with 9 additions and 9 deletions
|
@ -358,9 +358,9 @@ Script.include("/~/system/libraries/controllers.js");
|
|||
|
||||
var sensorToWorldScale = MyAvatar.getSensorToWorldScale();
|
||||
|
||||
var radius = capsuleData.radius / sensorToWorldScale;
|
||||
var height = (Vec3.distance(capsuleData.start, capsuleData.end) + (capsuleData.radius * 2.0)) / sensorToWorldScale;
|
||||
var capsuleRatio = 10.0 * radius / height;
|
||||
var diameter = 2.0 * capsuleData.radius / sensorToWorldScale;
|
||||
var height = (Vec3.distance(capsuleData.start, capsuleData.end) + diameter) / sensorToWorldScale;
|
||||
var capsuleRatio = 5.0 * diameter / height;
|
||||
var offset = _this.pickHeightOffset * capsuleRatio;
|
||||
|
||||
_this.teleportHandCollisionPick = Picks.createPick(PickType.Collision, {
|
||||
|
@ -370,9 +370,9 @@ Script.include("/~/system/libraries/controllers.js");
|
|||
shape: {
|
||||
shapeType: "capsule-y",
|
||||
dimensions: {
|
||||
x: radius * 2.0,
|
||||
y: height - (radius * 2.0),
|
||||
z: radius * 2.0
|
||||
x: diameter,
|
||||
y: height,
|
||||
z: diameter
|
||||
}
|
||||
},
|
||||
position: { x: 0, y: offset + height * 0.5, z: 0 },
|
||||
|
@ -386,9 +386,9 @@ Script.include("/~/system/libraries/controllers.js");
|
|||
shape: {
|
||||
shapeType: "capsule-y",
|
||||
dimensions: {
|
||||
x: radius * 2.0,
|
||||
y: height - (radius * 2.0),
|
||||
z: radius * 2.0
|
||||
x: diameter,
|
||||
y: height,
|
||||
z: diameter
|
||||
}
|
||||
},
|
||||
position: { x: 0, y: offset + height * 0.5, z: 0 },
|
||||
|
|
Loading…
Reference in a new issue