I’m trying to use raycast to enable some information or objects on screen, but I’m having some trouble with raycast, scaling objects and zappar
I’m posting an example scene showing my problem:
This scene has 2 cubes, white and red, each one having his own collider separated in another entity.
When doing a pinch to scale the father object, that has the script, I made a calculation to change the collider Half Extents to keep together the size with the father and the cubes, because the collider doesn’t follow the father’s scale, so this need to be done.
Even after scaling, the collider seems it moves to the side depending on the camera position and the raycast doesn’t get at the collider.
I’m using the basic raycast detection that has in the examples
Even before the scaling, I was having some issues with raycast, collider and zappar…
I tried both fix that you used on this topic, and the one that you quote, works better, but still have some issues, depending on the camera position, the problem still happens, but is way better than before.
I created another scene on the same project, without zappar, but it’s seems is it’s okay the collision detection
the other scene (with zappar), I didn’t set your fix, so you can see the problem, i will upload a screenshot on where is the colliders for me when I rotate the objects and change the camera position:
@rpassareti if you’re having any more issues feel free to reply to the thread here and I’ll get back to you when I’m back in the office on Wednesday or make a thread on the Zappar forums where the support team can help out