Skip to content
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

use PlaneBufferGeometry with rotated X by -90° instead of BoxBufferGeometry #29

Merged
merged 1 commit into from
Oct 5, 2017

Conversation

vincentfretin
Copy link
Contributor

To be able to work with raycaster, you need to rotate the geometry, not the mesh.
With mesh rotation, you get intersects[0].face.normal = x: 0 y: 0: z: 1 and so your isValidNormalsAngle function returns false.
With the geometry rotation you get intersects[0].face.normal x: 0, y: 1, z: 1 and isValidNormalsAngle returns true.
I'll do a similar PR to aframe-environment-component, the generated ground geometry is currently a plane with a mesh rotation. If I do a similar fix and rotate the geometry and not the meshs, I can teleport on the hills! So much fun. :)

@fernandojsg
Copy link
Owner

@vincentfretin nice catch! ;) thanks

@fernandojsg fernandojsg merged commit 13e5d62 into fernandojsg:master Oct 5, 2017
@vincentfretin vincentfretin deleted the default-plane branch October 27, 2017 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants