Forum Discussion

fakemovement.meta's avatar
fakemovement.meta
MHCP Partner
1 year ago

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

  • proto_xr's avatar
    proto_xr
    MHCP Partner

    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's avatar
    proto_xr
    MHCP Partner

    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.

    • fakemovement.meta's avatar
      fakemovement.meta
      MHCP Partner

      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.

  • 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.

    • fakemovement.meta's avatar
      fakemovement.meta
      MHCP Partner

      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 😞