[SOLVED] Zappar and Raycast problem

Hello everyone!

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…

Any ideia or suggestion?


Sounds like this issue?

1 Like

Thanks for the reply!

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.

Can the issue be reproduced outside of using zappar? If so, it would be great to have a reproducible project to look at.

Could be related to the resizing code you have?

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:

to get this result, I rotate the objects, scale, set position, and try to click, and it get really bad

(and for some reason, the camera AR is not activating to see the real world)

Please thread: Zappar Universal AR You can't see the real background

I’ve not had a chance to look at this yet but as it works without Zappar, you are best asking on the Zappar support to see if there are any issues that they are aware of

With your fix that you quote before, fixed the problem
I tested for a long period of time with different positions, zooms, rotations and works better

Cool, so is the issue considered solved? :slight_smile:

Should i put on title [RESOLVED] or you do it automatically?

I will do it, thanks!

1 Like

@left Is this something that is already fixed in the current version of the integration? I vaguely remember seeing the pc.Camera properties being set now?

1 Like


Yeah - a fresh fork should function as expected.

@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 :slightly_smiling_face: