jujunjun110 / aframe-crawling-cursor

MIT License
45 stars 12 forks source link

Issue with aframe v0.6.0 #10

Open riechi opened 7 years ago

riechi commented 7 years ago

I'm using the cursor with the latest release of aframe on Chrome desktop and this error pops up: cattura What could it be? Thanks in advance.

jujunjun110 commented 7 years ago

@riechi Thank you for reporting. I try to find the cause.

jujunjun110 commented 7 years ago

On debugging, I found the error happens when a raycasted object is obj model. When it is simple geometry like cube, it does not happen.

Now I try to get more detail...

riechi commented 7 years ago

Should've actually added that detail when writing the issue, the object that is being raycasted in my project is indeed a simple geometry (a plane). An obj model only pops up on the plane when a button is clicked, and for its positioning I use the plane coordinates that the cursor is raycasting in that moment (and even then, the obj model is set to invisible, thus not "crawlable" by the cursor).

Anyway thanks for the quick reply & feedback! Looking forward to any other insights : ]

UXVirtual commented 7 years ago

I'm having the same issue, even with simple geometry. I'll try doing some more trial and error to find the cause.

mariaheine commented 7 years ago

Try removing primitive "a-cursor" from your crawling cursor target (make it a plain 'fake' geometry-only cursor) as it makes you have two raycasters in a scene. One belonging to the camera (which is needed for this component) and one inherently built in a-cursor primitive which doesn't seem to have any use here.

jujunjun110 commented 7 years ago

In my environment, a problem causes only within OBJ model. I found this seems to be related with following issue and now I am working to deal with it.

https://github.com/aframevr/aframe/issues/2980

In my environment, no problem occurs in primitive shapes. If someone has example, I would like to see it.

jujunjun110 commented 7 years ago

@riechi @HAZARDU5

Sorry to be late for dealing. Today I released a new version which probably fix the problem.

I guess the cause of the problem was below.

  1. The raycaster component works only for object which is registered with refreshObjects() method.
  2. refreshObjects() is automatically called when raycaster is set, but objects added after it were not registered in particular conditions. (This problem is now recognized by a-frame core developers and will be fixed in future release.)

For now, in this release, I make refreshObjects() called in a certain interval.

Could you test new version(1.0.9)? If my guess is right, Problem is fixed.

In my environment, it is working with A-Frame 0.7.0.