Ace3: Laser pointer renders in the first raycasted object for observer

Created on 22 Jan 2019  路  5Comments  路  Source: acemod/ACE3

Arma 3 Version: 1.88 (stable)
CBA Version: 3.9.1 (stable)
ACE3 Version: 3.12.5 (stable)

Mods:

- CBA_A3
- ace
- Other mods (didn't test with CBA + ACE3 alone yet)

Description:

  • Laser pointer renders in the first raycasted object, instead of being hidden behind it.

20190119161143_1
20190119161142_1
_Note: Player next to the wall is not intersecting the laser! Not the ideal screenshots._

Steps to reproduce:

  • Make an X player turn on laser pointer and aim it at a wall.
  • Look at it from 45掳 from player X
  • Make another player Z stand between you and the wall.
  • Observe laser now being on the player Z instead of where it's pointed at by the laser player X.

Where did the issue occur?

  • Dedicated

Additional information:

  • Only visible like that to observer.

RPT log file:

  • N/A
kinbug

Most helpful comment

To do this correctly we need 2 ray casts,
1: from laser forward to see where dot should be
2: from player view to laser dot to see if we have visibility to it

All 5 comments

Courtesy of @Drofseh:

Would be explained if we ray traced from the observer to the target. Which doesn't happen.

https://github.com/acemod/ACE3/blob/master/addons/laserpointer/functions/fnc_drawLaserpoint.sqf
The code is raytracing from the target, in his weapon direction and takes the first intersection.
It's not tracing from the local player. It only takes position and directions from the target (the origin unit who holds the laser)

https://github.com/acemod/ACE3/blob/master/addons/laserpointer/functions/fnc_drawLaserpoint.sqf#L47
That is weird. _unit is the player, and it's in the ignore list.
Meaning the laser will just pass through the player? Like if the origin is behind you and he's shining through you. Then it will not consider the intersection on your own body.
That's kinda dumb.

Another case, marked this time:

It shouldn't render in this case at all and it should be a lot smaller.

This is still an issue in 3.13.0. Laser point/dot is also way too big at certain distances.

To do this correctly we need 2 ray casts,
1: from laser forward to see where dot should be
2: from player view to laser dot to see if we have visibility to it

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mihal190 picture mihal190  路  4Comments

Dyadka940 picture Dyadka940  路  3Comments

Avokadomos picture Avokadomos  路  3Comments

lividsubset3 picture lividsubset3  路  3Comments

DieselJC picture DieselJC  路  3Comments