Showing the changes to scripts/system/controllers/controllerModules (1 of 1 file). Show all
Unified · Split
| @@ -358,9 +358,9 @@ Script.include("/~/system/libraries/controllers.js"); · 357 unmodified lines | |||
| 358 | 358 | ||
| 359 | var sensorToWorldScale = MyAvatar.getSensorToWorldScale(); | 359 | var sensorToWorldScale = MyAvatar.getSensorToWorldScale(); |
| 360 | 360 | ||
| 361 | var radius = capsuleData.radius / sensorToWorldScale; | 361 | var diameter = 2.0 * capsuleData.radius / sensorToWorldScale; |
| 362 | var height = (Vec3.distance(capsuleData.start, capsuleData.end) + (capsuleData.radius * 2.0)) / sensorToWorldScale; | 362 | var height = (Vec3.distance(capsuleData.start, capsuleData.end) + diameter) / sensorToWorldScale; |
| 363 | var capsuleRatio = 10.0 * radius / height; | 363 | var capsuleRatio = 5.0 * diameter / height; |
| 364 | var offset = _this.pickHeightOffset * capsuleRatio; | 364 | var offset = _this.pickHeightOffset * capsuleRatio; |
| 365 | 365 | ||
| 366 | _this.teleportHandCollisionPick = Picks.createPick(PickType.Collision, { | 366 | _this.teleportHandCollisionPick = Picks.createPick(PickType.Collision, { |
| @@ -370,9 +370,9 @@ Script.include("/~/system/libraries/controllers.js"); · 3 unmodified lines | |||
| 370 | shape: { | 370 | shape: { |
| 371 | shapeType: "capsule-y", | 371 | shapeType: "capsule-y", |
| 372 | dimensions: { | 372 | dimensions: { |
| 373 | x: radius * 2.0, | 373 | x: diameter, |
| 374 | y: height - (radius * 2.0), | 374 | y: height, |
| 375 | z: radius * 2.0 | 375 | z: diameter |
| 376 | } | 376 | } |
| 377 | }, | 377 | }, |
| 378 | position: { x: 0, y: offset + height * 0.5, z: 0 }, | 378 | position: { x: 0, y: offset + height * 0.5, z: 0 }, |
| @@ -386,9 +386,9 @@ Script.include("/~/system/libraries/controllers.js"); · 7 unmodified lines | |||
| 386 | shape: { | 386 | shape: { |
| 387 | shapeType: "capsule-y", | 387 | shapeType: "capsule-y", |
| 388 | dimensions: { | 388 | dimensions: { |
| 389 | x: radius * 2.0, | 389 | x: diameter, |
| 390 | y: height - (radius * 2.0), | 390 | y: height, |
| 391 | z: radius * 2.0 | 391 | z: diameter |
| 392 | } | 392 | } |
| 393 | }, | 393 | }, |
| 394 | position: { x: 0, y: offset + height * 0.5, z: 0 }, | 394 | position: { x: 0, y: offset + height * 0.5, z: 0 }, |