Billboard mode in Babylon React Native

Hi!
I’m trying out the billboardMode on a mesh, I tried BILLBOARDMODE_ALL, BILLBOARDMODE_X and BILLBOARDMODE_Y but they all seem to behave as BILLBOARDMODE_ALL.

I’m setting the value like this:
localParent.billboardMode = Mesh.BILLBOARDMODE_ALL;
localParent.billboardMode = Mesh.BILLBOARDMODE_X; and
localParent.billboardMode = Mesh.BILLBOARDMODE_Y;
I tried setting them in a playground on web and they do work there.

Do I need to assign them differently or is only BILLBOARDMODE_ALL supported?
I’m using versions:
@babylonjs/core”: “5.0.0-alpha.65”,
@babylonjs/react-native”: “0.4.0-alpha.47”,

Thanks! :smiley:

Hello! Tagging @bghgary for Native stuff :smiley:

1 Like

Can you send a link to a PG where it works? That will help us repro it faster. Thanks!

Sure! I tested it out in this playground:

Where it works, and you can see different behaviour in the planes. But in my react native scene they all behave like BILLBOARDMODE_ALL.

I haven’t tried Babylon React Native yet, but this playground works the same as a browser in Babylon Native directly. Will try Babylon React Native next.

I tried in Babylon React Native and it also works correctly. Can you double check on your side?

2 Likes

Hi! Well that’s some egg on my face then, I’ll just take your word on that and see what’s going on. Maybe I’m accidentally resetting it somewhere…

I’ll check when I’m back at work on Monday and report back wether it works or not, thanks for looking into it!

2 Likes

Alright! I also got it working here in a new BabylonReactNative project. So I messed it up somewhere, thanks again for looking into it. I’m going to be hunting this very odd bug then :woman_shrugging:

1 Like

Oh wow, in case anyone is curious, this was on me using id to find objects in the engine instead of uniqueId. So it would only find the node that had the BILLBOARDMODE_ALL, that’s why when I checked the billboardmodes, they would all give the correct setting but everything behaved like BILLBOARDMODE_ALL.
Wow, embarrassing :joy:

Nothing embarrassing and glad it has been solved :slight_smile:

2 Likes