Skip to content
Snippets Groups Projects
Commit c9e47d7c authored by Kevin Lee's avatar Kevin Lee
Browse files

fix bug where joystick input in rift would drop objects; fix bug where media...

fix bug where joystick input in rift would drop objects; fix bug where media loader objects loaded for the first time lose their physics shape
parent 7d235491
No related branches found
No related tags found
No related merge requests found
...@@ -28,7 +28,7 @@ AFRAME.registerComponent("media-loader", { ...@@ -28,7 +28,7 @@ AFRAME.registerComponent("media-loader", {
const box = getBox(this.el, mesh); const box = getBox(this.el, mesh);
const scaleCoefficient = resize ? getScaleCoefficient(0.5, box) : 1; const scaleCoefficient = resize ? getScaleCoefficient(0.5, box) : 1;
this.el.object3DMap.mesh.scale.multiplyScalar(scaleCoefficient); this.el.object3DMap.mesh.scale.multiplyScalar(scaleCoefficient);
if (this.el.body && this.shapeAdded) { if (this.el.body && this.shapeAdded && this.el.body.shapes.length > 1) {
this.el.removeAttribute("shape"); this.el.removeAttribute("shape");
this.shapeAdded = false; this.shapeAdded = false;
} else if (this.el.body.shapes.length === 0) { } else if (this.el.body.shapes.length === 0) {
......
...@@ -68,7 +68,6 @@ const config = { ...@@ -68,7 +68,6 @@ const config = {
"oculus-touch-controls": { "oculus-touch-controls": {
joystick_dpad4_west: { right: "snap_rotate_left" }, joystick_dpad4_west: { right: "snap_rotate_left" },
joystick_dpad4_east: { right: "snap_rotate_right" }, joystick_dpad4_east: { right: "snap_rotate_right" },
joystick_dpad4_center: { left: "action_primary_up", right: "action_primary_up" },
gripdown: ["primary_action_grab", "middle_ring_pinky_down"], gripdown: ["primary_action_grab", "middle_ring_pinky_down"],
gripup: ["primary_action_release", "middle_ring_pinky_up"], gripup: ["primary_action_release", "middle_ring_pinky_up"],
abuttontouchstart: ["thumb_down", "increase_radius"], abuttontouchstart: ["thumb_down", "increase_radius"],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment