-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
oob-collider not setting el.object3D as default #5501
Comments
Can you share an example to reproduce issues with https://glitch.com/~aframe Thanks! |
Sure. I ve tested. Both the sphere and the model have the same behaviour. I think that just with the VR hands colliding it will work properly. |
For some reason I cannot open the glitch
|
Maybe you want to recreate the glitch. I'm getting the same error. |
Looks like a misunderstanding. Recommend reading the docs. Can improve if necessary: https://aframe.io/docs/1.5.0/components/obb-collider.html You don't have to call any function manually. Just setup the component in relevant entities. I see collision events fired as expected:
The value you have to check is trackedObject3D is an internal variable that you wouldn't need to check but not sure I'm understanding what you are trying to do. If you can clarify... |
On the fiddle, I have called the function manually just to show the behaviour. You are right that withEl is sent on the emit. Looking at the obb-collider system the emit has two parameters. Also, in the docs. trackedObject3D is explained as: But this default behaviour does not work. |
What are you trying to accomplish? Why are you trying to use / access the |
|
A simplified version of your glitch: https://glitch.com/edit/#!/phantom-bead-vacation?path=index.html%3A29%3A9 See that |
Also notice you were using |
Indeed the component is working as intended. To correct myself, it is the system that is emitting null.
The system was coded to have both trackedObject3D and withEl in the same emit. I think, if you have many collisions happening, in one single event you have both entities involved in the collision. This is a good behaviour. My idea was to increase consistency in the system. |
We should probably remove |
Also notice that |
But. Inside the hand-tracking-grab-controls component, the The usage of |
Hah. Reviewing the hand-tracking-grab-controls component it seems So probably we should do as you say, remove in the next revision. |
Description:
By checking the obb-collider component I have two doubts:
Is there really a need of calling checkTrackedObject inside tick? As the trackedObject is changed via property update, it should be called inside update and not in every tick. I think it will work the same, but less work.
The oob-collider system emit the event to both collider entities and uses component.trackedObject3D. However inside the component this.trackedObject3D is never defined as default to this.el.object3D and the emit goes empty.
In some of the component methods we see || this.el.object3D, but never assign it to this.trackedObject3D
Regards,
The text was updated successfully, but these errors were encountered: