WithThreeJs Raycast help?

How do i use Raycast that is in the WithThreeJs Extension?

There is no documentation about this and i don’t know how to use it at all, i don’t know what is “index” since it doesn’t say anywhere what is it, it only says that it exists

I don’t know if it only works on the 3d objects from the extension or does it work on all of them?

I really don’t know why it doesn’t work for me, In the events it says that it suppose to give me the “distance” but it gives me 0 so clearly i did something wrong but i don’t really know what

also Every raycast event doesn’t work and just gives me 0, idk what to do anymore i been stuck on this for 20 days now

(Also it doesn’t work with any 3d object and i can’t change those 3d objects z-order or rotate them even tho in editor it says i can do that so idk if raycast is just bugged or im doing something wrong again)

Have you considered using this extension instead:
https://wiki.gdevelop.io/gdevelop5/extensions/raycaster3d/

1 Like

Does it work with WithThreeJS?

I don’t know but if you are just starting your project you should probably use Pandako’s new extension that uses GDevelop 3D features.

i can’t use gdevelop 3D because it doesn’t have sprite sheet extension and i can’t add extensions to 3D object because it’s separate object not a Tiled Sprite, i have to use WithThreeJS

Piskel can split the spritesheet check the engine documentation