Hello everyone. I do not speak English well, but I hope you understand. I’m studying Babylon not long ago.
I was looking for point-click movement system. I found many examples but did not find anything similar with colision. I wrote it from what I found and what I know. Almost everything works well. I want to leave it here, maybe someone will cut precious hours.
https://playground.babylonjs.com/#1LZVU4#4
I have a few questions.
When I transfer everything to my domain. I have problems with the cursor. When you move it, it changes to default from css, although it should be different until you breake the button. can see here http://gamejs.hameron.live
Not sure I understand, I see the same thing in the PG and in your site: the cursor is a “hand” all the time, even when I move it (tested in Windows, Chrome and Firefox latest versions).
Using the latest Firefox I have the following in the PG (playground)
default cursor
click on ground get a hand
move cursor return to default
in the live site it is a hand all the time
You’re right, I have the default cursor when moving the mouse in the PG (Chrome and Firefox)… I don’t know if something changed since I tested or if I had some sh*t on my glasses when I first tested (probably the latter…).
I have a new question. Maybe somewhere there have examples of how to do into train sectors? To make a movement round of mesh with calision.
I do not ask for me to write the code, I ask only to suggest a way to implementation. Tell me where you can read about it, please. Or what mechanics can be implemented.
As it is the week-end, answers will take more time.
This is a problem of path finding, so you can search anything related to this.
“nav mesh” would probably help here too, but I’m no specialist (look for “nav mesh” in this forum).
Yep, navigation mesh is your friend in this case the Docs can be found here - Create Navigation Mesh - Babylon.js Documentation , which would be a good starting point. This is a quick youtube that explains how to use it - YouTube
Wow! Thank you so much! This is exactly what I need! I searched for this example so long)
Navigation mesh its giving me a error recast is not defined how can i fix that please
Would be great to have more info about the error or a repro in the playground.
cc @Cedric
This is probably because you didn’t initialize recast correctly. The quick answer is here - Creating A Navigation Mesh | Babylon.js Documentation , but it does seem like you have alrewady started the discussion here - Recast is not defined?. Is that the same issue?
yeah its the same i think its bc i am using typescript instead of javascript
hello @RaananW
I have one problem. It is probably that the recast is not initialized.
Occurs in the iOS mobile environment
Generate engine, scene and RecastJSPlugin (wait for reacst → create no problem)
Repeating this and reloading, allocating or replacing will result in an error:
RuntimeError abort (out of memory)
There is no problem with pc, mac, samsung galaxy, but not with ipad, ios mobile
Is it an initialization problem or something else?
I wonder if @Cedric even encountered this issue?
feels like you probably dont need to re-initialize recast if it is already executed, but reloading (i assume - page reload) should clear the scope and prevent this kind of out-of-memory issue
Temporarily, reuse recast to solve this Error
No, I’ve never encountered this error. If the page is refreshed, I think everything gets properly initialized. Otherwise, best is to only initialize recast once. Same goes for ammojs.