Surface detection is possible in babylonjs package

Hi Team
@Cedric Surface detection is possible with babylonjs package,

@Cedric @bghgary @sebavan @Takemura

Nice! Is it done with Babylon? I don’t see any reference to it in the tweet.

@Cedric I’m asking is it possible with Babylon’s package?.

Did you check XR features? WebXR Augmented Reality Features | Babylon.js Documentation

1 Like

cc @RaananW

It is possible using hit-testing, of course.
See the link @Cedric pasted for examples

Okay thanks

@Cedric @RaananW
hit-testing is possible with react native mobile app?

AFAIK hit test does work in babylon native, but cc @BabylonNative just to be sure :slight_smile:

@RaananW
Do you have any samples for react native webXR?.
i am unable to find it

It does ! BabylonNative/experience.js at a676d6df117cb6cdebc5c347b8aa37f2fed852fb · BabylonJS/BabylonNative · GitHub
idk if it’s enough to get a plane

1 Like

the example doesn’t really take a plane, it adds a plane on the hit-test plane

1 Like

BJS - [19:28:55]: Hit test is an experimental and unstable feature.
i am getting above error.

not quite an error, just a friendly warning :slight_smile:

1 Like

Not gonna lie, totally expected you to come back just asking them to implement it for you lol. Kudos for doing work, thats really cool you got it working. Any screenshots?

Note to self: check if the expo app ships with this capability

sorry i was little busy

@RaananW @Cedric
var plane = BABYLON.MeshBuilder.CreatePlane(“rttPlane”, { width: 4, height: 4 }, scene);

i am facing error in react native
TypeError: undefined is not an object (evaluating ‘_core.default.MeshBuilder’)

Is scene in scope?

1 Like

if you could share code, repro, github project, we will be able to provide help. Otherwise it will be very hard for us to understand the exact issue here.
I guess it is a missing import, but i can’t really tell.

1 Like