Collision Shapes Don't Match the 3D Model

Fuck me dead bro! :smiley:

Now this backfires to you:

Make a PG which focus solely on the problem.

I’m not sure you really know what you are talking about here. :smiley:
You are using a sync version of the loader and wrap it in a Promise which make it async and you say you don’t need async.

Same story. (which is already the case but i simplified the code before sharing it here). - are you sure you know what are talking about? You can’t load a model into the scene from another thread. You can load the binary data, you can prepare the data for the GPU buffers (not the buffers directly) and send them to the main thread which can send the data to the GPU.

XHR requests are processed by the browser simultaneously (depends on how many conneciton per hostname are allowed) so basically they are processed in a new thread. Why bothering with creating new threads? How could you’ve already implemented it in this way?

Yeah, but let’s focus on the collision problem, solely. :smiley:

@inteja

1 Like

Dude is mad because he tried to get a free like by writing a needless message telling me to use Async, and I told him that it’s not related to the thread/problem. Wasting time frustrated boy.

I’m not always accurate with the words I use, you are searching for the problem… of course, I load the binary data in another thread and not the full model directly into WebGPU, i know how work WebGPU and WebGL. What is with that frustrated guy? Just because you didn’t get a like for a needless message, you have to crap on me like that? Clearly, 100% of your messages here are needless which is not the case of all the other people who replied here.

  1. Using ImportMeshAsync in the function generates a bug (you should have tried it before publishing it), so instead of replying with such message, learn how to code with no error generated into the console.log and that block the engine.

  2. It’s not my playground, i just modified it a bit. In my last codes, I used a part of the Playground that I found in another thread and mixed it with my code. Like I said, I tried many different things, so it was not production-ready code… when it’s not production-ready, you don’t waste time perfectly modifying all the code because you’re just experimenting… Also, i said that i tried to use IA to get different answers, and the IAs are sometimes giving dirty code but i’m not actually working on the production code (read me… why i talk about the fact that i was doing benchmarks until i get this problem of collision ? i wasn’t not working on production code… you are so a wasting time guy)

What is your problem? All that frustration because you didn’t succeed in getting a like by telling me that I should use meshAsync?

Dude, stop here, you have a serious problem of ego.

Please guys, stay focused on the problem, if you can’t, don’t publish here. This is simple as that.

The collision worker don’t have rendering part and i have different stuff to rework to make it working into a playground.

I totally accept the fact that nobody want to download my archive and take 1 minute to type “npm install” and “npm run dev”, now, you can accept the fact that i won’t take more than 1 hour to try to make my code work on the Playground without garantee that someone will be able to find a solution to my problem. If you don’t want to help me because i don’t use the Playground, this is a respectable choice, you can also respect my respectable choice to not take the risk to waste more time by adapting my code into the Playground. I will stay with Godot and that’s ok…

I won’t read your future messages.

(i did everything to try to stay kind and cool, but with a guy like you? What kind of person are you… We should be able to block people who reply in our thread. Clearly mad because you don’t accept the reality and the fact you didn’t get a like)

1 Like

I appreciate @roland for sharing insights and also understand @Marvin 's point of focusing on the collision issue. Covering multiple topics in one question can bloat the thread, making the root solution harder to find

Hopefully, we can find a solution here

1 Like

Okay, it seems that I found the problem. I’ll work on some adjustments and get back to you.

Please stay polite, @roland is taking his time to help you for free and is making solid points. Stop trash talking skilled people or no one will want to help you in the future, and help you will surely need because a MMORTS is certainly not something someone can create alone in a reasonable amount of time.

As for the Playground, it is true creating a minimal repro takes some time. But isolating the problem in a minimal example is often the fastest way to fix it (sometimes I don’t even need to ask the question here because I solve my issue when writing the PG)

Installing your code base is not just a matter of running npm i, there are quircks with the build system, you may have your own way of starting up the engine and many more potential issues that can make debugging harder, while the PG is standardized and just works.

Don’t forget that people helping you are doing it for free and only do it because they are nice and want to help you, not troll you.

I am curious to see what was the solution to this issue

1 Like

I have the feeling that the problem comes from merging meshes.

If I can jump in - without even reading what the issue is -

I am asking EVERYONE to stay cool and try to understand that this is an open forum for a wonderful community. There is no need to name names, there is no need to turn impatient and there is no need to escalate things that shouldn’t escalate.

I am a second before locking this thread.

I will not remove any message from this thread at the moment as well, though some were correctly flagged. Just keep your cool, be kind, and that’s about it.

4 Likes

Okay, i found the problem. It was an issue with both the main thread and the collision thread.
As I suspected since yesterday, it was a problem with the rotation. The rendered hitbox and the one in the worker were indeed matching but had a rotation. A few days ago, during a test related to the problem that occurred when i started this thread (when it was a rectangular box for the collision shape) and when the physics wasn’t completely initialized, i changed a value from 0 to Math.PI in order to get a rotation.

After improving the physics, i synchronized the rendered hitbox and models by sending values from the worker thread to the rendering thread. During the same time, i added a rotation for the collision shapes in the worker. This resulted in the models in the main thread rotating twice, while the shapes in the worker were rotating once…

Thank you to everyone who tried to help me and participated. Despite the tensions, i really appreciated the support and assistance from everyone.
Great community.

@CrashMaster i port my already existing/mostly finished 2.5D MMORTS from a 2D custom engine to 3D, as WebGPU and new laptop iGPU give pretty good performance. Despite this little mistake, it’s pretty easy to handle (it’s just one game for my gaming plateforme, but you right, maybe i could need help one day or another).

That said, to be very honest and despite my manners to write, i wasn’t trying to trashtalk or being angry, except for when i started reading a comment few hours ago that gave me the impression of being despised. For my previous messages i understand that these were inappropriate remarks as BabylonJS is a great product and free.

I could destroy the whole earth with such spacecrafts, so guys, i HIGHLY encourage you to stay cool. :grin:

2 Likes

Yes, that’s the point. I don’t even understand how could I receive such a rude response. I just tried to draw his attention to a function that he may not have known about. :see_no_evil:

1 Like

Locking the thread as I want to see only love and happiness:)

3 Likes