Hi… I’m here again (sooner than I would like)!!
My problem now is with “Raycast”. What happens is that after I move, scale or rotate the object, raycast can no longer understand its limits. It understands that the mouse is on the object when it is actually off and vice versa.
I’ve already applied the rotation and scale to the object, but the error persists… it even increases, sometimes.
Any tips I don’t know?? I didn’t find anyone talking about it. Oh, I’ve also done all the transformations in edit mode, which didn’t improve the result.
I appreciate any help.
hi, there are a lot of nodes with raycast, which one did you use?.. did you look the examples? maybe here you didnt find any topic about it but sure youll find in discord: here you can find all the links of the community
Okay my friend Lapiznegro,
I’ve already been checking. I found someone with the same problem, but it remained unsolved.
In my case, I’m using a simple “Raycast Object”. I don’t believe the problem is with the nodes, but rather with the object when created in Blender (at least that’s what it seems like). After transforming the object, is there anything else that needs to be done besides applying the changes?
There is an example of that raycast in examples folder:
If you applied scale and rotation check the object origin. You can enable debug console to see the object debug draw.
Hi Lapiznegro,
Well, the objects I’m using as the “Raycast” target are not “Rigid Body” and there’s nothing different when I have the “Collider Wireframes” activated.
What I noticed is that when I remove the “Parent” of these objects with the camera, Raycast starts to work much better.
In fact, these objects are planes that I use as the steering and shooting controls and they must be in the same location on the screen (it will be played on a touch screen).
I can’t put them as “Rigid Body” because they start to interfere with other objects in the scene.
I tried using Canvas but I can’t use it when I export to HTML5. The game freezes and doesn’t run.
Are there any other options for placing controls on the screen, to be used on a touch screen?
But did you check origin of those planes?
Collider wireframes are for physics objects it has nothing to do here.
Since raycast dont use object rotation just origin and dimensions maybe you could check that. Use the debug console to check those.
If you are not interested in the objects and they are just controls on screen i think you could use the node touch in region and just draw the controls or use an image. Those are 2d in the screen.
Canvas should work on html5 you need to look for the error so we can help you.
In fact there is an example of touch controls that uses exactlty that:
https://armory3d.github.io/armory_examples_browser/examples/logic_gamepad/
Thank you my friend Lapiznegro, you saved my day!
I started working with nodes to draw the objects (controls). Easier, safer and exactly what I wanted!
Thank you very much again!!