Ocean Component does not register clicks when using Cursor Component Tutorial #105

JGL opened this Issue Nov 8, 2016 · 1 comment


None yet

2 participants

JGL commented Nov 8, 2016

Following the Cursor tutorial here:
I made a pair of components - one to change the ocean material side property to Double instead of Front sided:
And the other as a listener to the Cursor component:
A demonstration of the side modifier in action can be seen here:
A demonstration of the click not being triggered can be seen here:
You can see the same Cursor Listening with the Mountain Component here:


Looks like the A-Frame raycaster ignores intersections with objects that don't have an entity attached:

// raycaster.js
// Only keep intersections against objects that have a reference to an entity.
intersections = intersections.filter(function hasEl (intersection) {
    return !!intersection.object.el;

In my code here, I call el.object3D.add(this.mesh);. Presumably I should be using el.setObject3D('mesh', this.mesh); instead, and that would automatically set mesh.el.

Traveling today, and will get that patched when I'm back. Or would take a PR as well. :)

@donmccurdy donmccurdy added the bug label Nov 8, 2016
@donmccurdy donmccurdy added a commit that closed this issue Nov 11, 2016
@donmccurdy Use setObject3D() for <a-ocean />
Fixes #105.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment