2 Problems with my Product Configurator

Hey hey… thank you all for your very good support in the documentation and this forum. i will finaly complete the product configurator for the Houseboat company i work for. i got two problems for you.

the first is: if i use the preview babylon version (https://preview.babylonjs.com/babylon.js) everything works fine till you activate some of the options on the rightside (or one of them multiple times on/off) the mouse rotation stop workin and everytime you try to use the mouse it cause an error in the Console: “TypeError: undefined is not an object (evaluating ‘i.subtractToRef’)”

the other one is: if i use the stable cdn babylon version i get the error “TypeError: n.bindEyePosition is not a function. (In ‘n.bindEyePosition(a)’, ‘n.bindEyePosition’ is undefined)” except i deactivate the Watermaterial.

the link to my configurator is: Mein Adventure

sry it is in german becouse i live in germany. this is also the reason for my poor english. :blush:

so please help me. what did i do wrong?
And sorry, i am not able to create a playground.


Thanks for sharing your Boorkonfigurator! :slight_smile:

It is very hard to debug scenes outside of our scope (playground, for example). It is even harder debugging scenes using the minified version of the framework. From the quick look I took, it seems to me like you are not disposing certain meshes correctly, OR that one of the imported meshes has an issue.

If you can reproduce this, and provide easy steps to get there (and some form of a debug minimal version of your code) it will be much simpler helping you.

About the cdn-vs-preview issue - are you loading all packages from the CDN? or were you only replacing babylon’s core engine? make sure you load all packages from the same place.

Tja… A lot (I would say most) of us don’t speak english as a first language. We still get along just fine :slight_smile:

1 Like

Thank you for your quick answer.

I understand it is hard to debug. i just hoped you say “ah i know this easy beginner failure - just do it that way ->”

I dont dispose anything in the scene… i just enable and disable. the loading animation is just moved in the sky together with its ui-label to get out of the way… :blush:

i belive both errors may came form the same problem with weired mesh positioning or something like this. i have tryed a lot of things to slove the problem. :frowning:

i will try to reproduce a minimal version.

my first version works with the cdn version without any issus. but 2 weeks later the water wasent displayed anymore and the error apears. i thougt something was update or changed. So i tryed the preview version (with all the Packages).

I don’t see a quick solution for that :slight_smile: Something went wrong while enabling/disabling one of the meshes. It might be an async-issue as well, as actions can be taken while the animation is still being executed, but I believe that’s not the case.

I noticed it fails inside the pick function. If you don’t need picking (if you don’t click on anything in the scene itself), try setting all meshes to isPickable = false, this might override the direct issue (though it won’t solve the problem, just ignore it gracefully)

The CDN version never changes. We deploy it once when we release a new version. So if you used 4.2 stable, it should always work. Can you reproduce that in the playground? You can select what version you are using

BTW - I am debugging a different bug right now that fails very similar to yours, though i can’t promise it is directly related. If you can find steps to reproduce that 100% of the time it will be very helpful

okay… i will try to reproduce it. the only clickable objekt is the tower on the small island in the backround as link to the tinyhouse configurator. which has the same problem with different GLTF file… so i think its somthing in the code or in the way i process the gltf file out of blender…

okay… i don’t know why, but… it works again. no problems. nothing changed on my code…

this is how far i came with the Playground: Babylon.js Playground but i dont know if i need to work on it anymore if it keep workin… hmmm strange…

I made a fix yesterday that makes sure the pick function fails silently if there is an issue with one of the faces. So no exception should be thrown.

very good. this helps a lot… yea i see the small tower is not clickable anymore after a few changes on the confiurator but the programm will work on. Thank you. this helps a lot.

Yeah, it doesn’t solve the direct problem with one of the meshes, it will just keep things going and not failing. This might present an issue if you require picking, then I would check which mesh it the culprit (debugging the _intersectTriangles function in SubMesh) and fix it.

okay. i will look at it. thanks a lot for your help. may you want to try one of these boats at an hot summer day in berlin in this case i may can help you… :wink:

1 Like

If you can arrange for a small Boat-office for me where I can just jump into Schlachtensee or something, I am all for it :slight_smile:

hehe… yes… maybe not the schlachtensee… but the lakes in the south-east of berlin are truley possible.

I’m in! tell me where to sign :slight_smile: