ssatguru / BabylonJS-CharacterController

A CharacterController for BabylonJS
Apache License 2.0
217 stars 46 forks source link

First person not working with glb avatars #65

Closed AlbertoElias closed 1 year ago

AlbertoElias commented 1 year ago

In the testAnimationGroup example which uses a .glb avatar, when scrolling to go into first person mode, it stops right before. If in the same example I change to the .babylon, it works just fine. I've tried with other .glb avatars and same issue. I'm not sure what's different.

ssatguru commented 1 year ago

You are right. The issue is that for glb, babylon adds a dummy "root " node at the top. When the CharacterControl makes the avatar invisible it is this dummy node that is being made invisible rather than the actual avatr mesh. I should probably check if the root node is "root" and if yes then go down the hierarchy looking for the avatar mesh and turn that invisible. I would work on this , sometime this week. thanks for reporting this bug.

ssatguru commented 1 year ago

@AlbertoElias I have put in a fix for this. https://github.com/ssatguru/BabylonJS-CharacterController/commit/b1712b7bf8055e6fab18178885e3f3ed68246bdd Fix in 0.4.4-alpha.7 version Try and let me know if it works for you now

AlbertoElias commented 1 year ago

@ssatguru Hey, thanks so much for the extremely quick turnaround. It does work! :)