javascript - how to use sphere-collider aframe -




hi trying use sphere-collider in aframe game, took sphere collider source , exported component, moving objs using timer , changing position using .object3d.position.y=some-position, after attaching event listener e.detail.el should emit collided object emitting objects. using wrong or there issue collider modified. please take @ code below understand modified.

original source:- link

aframe.registercomponent('sphere-collider', {    schema: {     objects: {default: ''},     state: {default: 'collided'},     radius: {default: 0.05},     watch: {default: true}   },    init: function () {     /** @type {mutationobserver} */     this.observer = null;     /** @type {array<element>} elements watch collisions. */     this.els = [];     /** @type {array<element>} elements in collision state. */     this.collisions = [];      this.handlehit = this.handlehit.bind(this);   }, //........ code long read rest open link above..    }); 

any appreciated, new , trying detect collision b/w multiple objects 50-100 may have more 20000 polygons looking efficient method.





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -