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

isValidNormalsAngle should apply mesh rotation before checking angle #49

Open
vincentfretin opened this issue Nov 11, 2017 · 2 comments

Comments

@vincentfretin
Copy link
Contributor

vincentfretin commented Nov 11, 2017

This is a follow-up on
https://github.com/feiss/aframe-environment-component/pull/21#issuecomment-335930480

It is currently not possible to teleport on generated ground (which is a THREE.PlaneGeometry with mesh rotated to -90 0 0), dressing, and cubes with the following parameters collisionEntities: .environmentGround, .environmentDressing, .cube.
If you use landingNormal: 0 0 1, this fixes teleporting on ground, but for dressing and cubes, it will not work anymore.

I don't know how feasible it is, but I think isValidNormalsAngle should check the normal of the intersected object with the mesh rotation applied.

@vincentfretin
Copy link
Contributor Author

Currently in my project, I edit isValidNormalsAngle function to just return true. Maybe we should add an option to disable the angle check? I'd prefer we find a good fix though.

@vincentfretin
Copy link
Contributor Author

vincentfretin commented Nov 11, 2017

There is already such an option actually! It's landingMaxAngle: 360.
I can use landingMaxAngle: 135 it works well enough. I can teleport on horizontal and vertical planes, but not say below a mushroom.

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

No branches or pull requests

1 participant