Skip to main content
fakemovementmeta
Participant
March 3, 2025
Question

GrabAimPosition Not Aiming at Screen Center in Horizon Worlds (Desktop Version)

Hi everyone,

I've built multiple worlds in Horizon Worlds and am experienced with setting up GrabAimPosition and GrabAimRotation. However, in the desktop version, the aiming does not align anymore with the center of the screen, even though I set everything up correctly.

Here’s an example of the issue:

Has anyone else experienced this problem? Could this be a bug, or is there a workaround?

Thanks for any insights!

7 replies

protoxr1487653
Honored Contributor
March 3, 2025

I recently ran into this problem as well and had to experiment to get the aim as accurate as I could to that center dot. Problem is that this changes depending if you are using the 1st person or 3rd person camera. I decided to force 1st person view and on the grabbable with the projectile launcher gizmo facing exactly forward and turning on Use HWXS Grab Anchor I found that the HWXS Anchor Rotation that worked for me was -5.50, -7.00, 0.00. If you want to use 3rd person camera you will need to experiment with this rotation to figure out what works best for you.

 

Proto_XR
fakemovementmeta
Participant
March 3, 2025

Thank you I will try. But What I don't understand is that, I did it in the past, and it was working perfectly, but not anymore...

fakemovement.meta
protoxr1487653
Honored Contributor
March 3, 2025

After you change the settings, turn that grab anchor toggle off and back on again. I have to do the same thing with my VR grab anchors for them to change to the new position and rotation.

Proto_XR
fakemovementmeta
Participant
March 3, 2025

I tried, but it's still not working... I've done guns in the past and know that my settings are good... I really think there is a bug.

fakemovement.meta
PigeonNo12
Honored Contributor
March 4, 2025

This is a unique case. In the laser gun of the example, the laser (red beam) is actually geometry: is a cylinder that changes its length according to the hit point of a Raycast. So the direction will always follow the direction of the weapon, regardless of where you are pointing at. You could adjust this by manually changing the grab rotation for XS (mobile and PC players) in the properties panel, or by overwriting the rotations with scripting, as soon as the object is grabbed.

This is different than using a projectile launcher; with the launcher gizmo you can use the tiny white directional arrow to point towards the center of the screen.

Upcoming Events : Build with a Mentor: Custom UI Thursday 3/20 at 5:00 PM PT Register March calendar of all Mentor Workshops and Office Hours
fakemovementmeta
Participant
March 4, 2025

Thank you so much for taking the time to answer 😍

Yes, I am using a Raycast, but when I  change the grab rotation for XS,  it's never in the center (depending on how far I am from the HitPoint)...

I am not sure how to overwrite this 😞

fakemovement.meta