From e2a39b4597a94f3929ea680dd1b042fd1f6d1875 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Mon, 18 May 2015 12:18:27 -0700 Subject: [PATCH] airhockey -- drop from slightly lower so paddle doesn't flip over. update grab script with new table name --- examples/example/games/airHockey.js | 4 ++-- examples/example/games/grabHockey.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/example/games/airHockey.js b/examples/example/games/airHockey.js index 9298c1d077..a725b8b49e 100644 --- a/examples/example/games/airHockey.js +++ b/examples/example/games/airHockey.js @@ -17,7 +17,7 @@ var FIELD_LENGTH = 1.92; var FLOOR_THICKNESS = 0.20; var EDGE_THICKESS = 0.10; var EDGE_HEIGHT = 0.10; -var DROP_HEIGHT = 0.3; +var DROP_HEIGHT = 0.25; var PUCK_SIZE = 0.15; var PUCK_THICKNESS = 0.05; var PADDLE_SIZE = 0.15; @@ -72,7 +72,7 @@ var floorFriction = 0.01; var paddle1Pos, paddle2Pos; // use some names that wont collide with other content -var names = ["air-hockey-table-23j4h1jh82jsjfw91jf232n2k", +var names = ["air-hockey-table-23j4h1jh82jsjfw91jf232n2k", // keep this synchronized with what's in grabHockey.js "air-hockey-paddle-23j4h1jh82jsjfw91jf232n2k", "air-hockey-puck-23j4h1jh82jsjfw91jf232n2k", "air-hockey-light-23j4h1jh82jsjfw91jf232n2k"]; diff --git a/examples/example/games/grabHockey.js b/examples/example/games/grabHockey.js index 58664950f0..e666bee609 100644 --- a/examples/example/games/grabHockey.js +++ b/examples/example/games/grabHockey.js @@ -144,7 +144,8 @@ function mousePressEvent(event) { var potentialTables = Entities.findEntities(MyAvatar.position, TABLE_SEARCH_RANGE); potentialTables.forEach(function(table) { var props = Entities.getEntityProperties(table); - if (props.name === "table") { + // keep this name synchronized with what's in airHockey.js + if (props.name === "air-hockey-table-23j4h1jh82jsjfw91jf232n2k") { var tablePosition = props.position; // when we know the table's position we can compute the X-Z bounds of its field fieldMax = Vec3.sum(tablePosition, fieldMaxOffset);