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

movement-controls broken with aframe 1.2.0 #349

Closed
Turtleted21 opened this issue Feb 8, 2021 · 9 comments
Closed

movement-controls broken with aframe 1.2.0 #349

Turtleted21 opened this issue Feb 8, 2021 · 9 comments

Comments

@Turtleted21
Copy link

Hi
movement-controls broken with aframe 1.2.0
<a-entity id="player" movement-controls="constrainToNavMesh: true; controls: keyboard" position="0 0 60" rotation="0 0 0">
worked with aframe 1.1.0

Thanks

@n5ro
Copy link
Collaborator

n5ro commented Mar 23, 2021

The big breaking change with threejs this month was the depreciation of Geometry, and the requirement that we use BufferGeometry instead. I found only one instance of THREE.Geometry in Aframe Extras and I merged a PR to fix it to THREE.BufferGeometry. This affected navmesh specifically. Try your code again and let me know if this fixed it or not.

@jaydhulia
Copy link

Hi @n5ro , I was wondering how do we test whether it works with the latest code changes or not? I tried to use https://cdn.jsdelivr.net/gh/n5ro/aframe-extras@geometry/dist/aframe-extras.min.js as the src, but it still had THREE.Geometry. Is it possible to elaborate on how to use the latest changes to test it?
Thanks!

@jaydhulia
Copy link

Edit: It also seems that the PR won't fix it, because https://github.com/n5ro/aframe-extras/blob/afcebe83edfe9bcbda0dcf055ff399f34d8f2a5f/src/pathfinding/system.js#L20 this function still expects a three.geometry object as a parameter?

@rossbishop
Copy link
Contributor

rossbishop commented Apr 10, 2021

Still having issues with Navmesh because of this. Results in "THREE.Geometry is not a constructor" error.

https://github.com/n5ro/aframe-extras/blob/afcebe83edfe9bcbda0dcf055ff399f34d8f2a5f/dist/aframe-extras.js#L11127

I can see the change you made in the PR @n5ro, that might fix it, I'll have to build it locally. Would make sense for the dist to be rebuilt in the repo to reflect the new changes.

EDIT:

Okay, I see that that change isn't actually in the master branch anymore, perhaps because it doesn't work...? Using that change I get the error "(intermediate value).fromBufferGeometry is not a function"

@n5ro
Copy link
Collaborator

n5ro commented Apr 11, 2021 via email

@n5ro
Copy link
Collaborator

n5ro commented Apr 11, 2021

I'm still working on a fix to navmesh https://glitch.com/edit/#!/navmesh1
https://glitch.com/edit/#!/navmesh
https://glitch.com/edit/#!/navmesh2

Feel free to read the commented code in each index file for details. I am trying to replace Three.Geometry which has been deleted from threejs with BufferGeometry. I could use some help testing this and withing this code, please remix the links and try to get it working also. In the meantime use Aframe 1.1.0 with A-Frame Extras until we get this fixed.

@rossbishop
Copy link
Contributor

Okay, I've got what I believe to be a fix for this.

See #358

@donmccurdy
Copy link
Collaborator

It might be worth bumping to three-pathfinding v0.14.1, it has some fixes for the Geometry/BufferGeometry situation that were not in v0.14.0. See donmccurdy/three-pathfinding#77.

@vincentfretin
Copy link
Member

I updated three-pathfinding to 1.1.0 in #388

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

6 participants