mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-27 20:58:46 +02:00
fixing toyball.js to work under Bullet
This commit is contained in:
parent
cf235705da
commit
ec86f0bd50
1 changed files with 3 additions and 2 deletions
|
@ -29,7 +29,7 @@ var RIGHT_BUTTON_FWD = 11;
|
||||||
var RIGHT_BUTTON_3 = 9;
|
var RIGHT_BUTTON_3 = 9;
|
||||||
|
|
||||||
var BALL_RADIUS = 0.08;
|
var BALL_RADIUS = 0.08;
|
||||||
var GRAVITY_STRENGTH = 0.5;
|
var GRAVITY_STRENGTH = 1.0;
|
||||||
|
|
||||||
var HELD_COLOR = { red: 240, green: 0, blue: 0 };
|
var HELD_COLOR = { red: 240, green: 0, blue: 0 };
|
||||||
var THROWN_COLOR = { red: 128, green: 0, blue: 0 };
|
var THROWN_COLOR = { red: 128, green: 0, blue: 0 };
|
||||||
|
@ -136,7 +136,7 @@ function checkControllerSide(whichSide) {
|
||||||
velocity: { x: 0, y: 0, z: 0},
|
velocity: { x: 0, y: 0, z: 0},
|
||||||
gravity: { x: 0, y: 0, z: 0},
|
gravity: { x: 0, y: 0, z: 0},
|
||||||
inHand: true,
|
inHand: true,
|
||||||
radius: { x: BALL_RADIUS * 2, y: BALL_RADIUS * 2, z: BALL_RADIUS * 2 },
|
dimensions: { x: BALL_RADIUS * 2, y: BALL_RADIUS * 2, z: BALL_RADIUS * 2 },
|
||||||
damping: 0.00001,
|
damping: 0.00001,
|
||||||
color: HELD_COLOR,
|
color: HELD_COLOR,
|
||||||
|
|
||||||
|
@ -185,6 +185,7 @@ function checkControllerSide(whichSide) {
|
||||||
velocity: { x: tipVelocity.x * THROWN_VELOCITY_SCALING,
|
velocity: { x: tipVelocity.x * THROWN_VELOCITY_SCALING,
|
||||||
y: tipVelocity.y * THROWN_VELOCITY_SCALING,
|
y: tipVelocity.y * THROWN_VELOCITY_SCALING,
|
||||||
z: tipVelocity.z * THROWN_VELOCITY_SCALING } ,
|
z: tipVelocity.z * THROWN_VELOCITY_SCALING } ,
|
||||||
|
collisionsWillMove: true,
|
||||||
inHand: false,
|
inHand: false,
|
||||||
color: THROWN_COLOR,
|
color: THROWN_COLOR,
|
||||||
lifetime: 10,
|
lifetime: 10,
|
||||||
|
|
Loading…
Reference in a new issue