ability to throw away physical objects #88

Open
opened 1 year ago by utopiah · 0 comments
utopiah commented 1 year ago
Owner

With the selectedElement e.g

el.body.applyImpulse(
  /* impulse */        new CANNON.Vec3(0, 1, -1),
  /* world position */ new CANNON.Vec3().copy(el.getAttribute('position'))
);

as the physics branch is relying on CANNON.js

For the impulse vector consider :

nextMovementToPoints(debut=false)
// then, after release
let direction = new THREE.Vector3().subVectors( last, first ).normalize()

Note that coupled with e.g addDropZone() one could add e.g a trash to delete or hide targets.

With the `selectedElement` e.g ```javascript el.body.applyImpulse( /* impulse */ new CANNON.Vec3(0, 1, -1), /* world position */ new CANNON.Vec3().copy(el.getAttribute('position')) ); ``` as the physics branch is relying on CANNON.js For the impulse vector consider : ```javascript nextMovementToPoints(debut=false) // then, after release let direction = new THREE.Vector3().subVectors( last, first ).normalize() ``` Note that coupled with e.g `addDropZone()` one could add e.g a trash to delete or hide targets.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: utopiah/text-code-xr-engine#88
Loading…
There is no content yet.