Author Topic: Highlight/clicking inconsistent with Environment curvature effect  (Read 160 times)

students_t

  • Newbie
  • *
  • Posts: 6
    • View Profile
Hi there; this continues to be a wonderful and very sophisticated asset, so thank you!

When the Environment curvature effect is applied, the voxel highlight/clicking system behaves as though there is no curvature applied. The problem is more severe with more extreme curvature (obviously) and when using the 3rd person controller (allows for highlighting/clicking more distant voxels). Here's an example of the problem from first person view:

https://ibb.co/9vgLssT

With more extreme situations (such as in 3rd person view), the highlight box might be entirely above the voxel it corresponds to, so you end up clicking the space above the voxel that you want the character to attack.

Any recommendations on where I might start if I wanted to make the highlight/click system be curved like/align with the rendered environment?

Thanks!

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 7262
    • View Profile
Hi,

Probably the highlight shaders do not make use of the same curve deformation since they were intended for short range. However it could be fixed.
I'll take a look into it soon and release a new beta.


Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 7262
    • View Profile
Fixed in latest beta.

students_t

  • Newbie
  • *
  • Posts: 6
    • View Profile
Phenomenal! Thank you so much!

students_t

  • Newbie
  • *
  • Posts: 6
    • View Profile
I went ahead and checked the newest beta and half of the problem is indeed resolved (the highlight now has the curvature effect). However, there is still an issue with the cursor not matching up with the actual image being displayed (see the attached file). This is most notable in 3rd person view while somewhat zoomed out.

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 7262
    • View Profile
That's side effect is trickier to solve since the curvature is a visual effect while raycasting uses physics. However, rays in physics cannot follow a curve so there will be always a shift which depends on the distance to the voxel.
There could be some workarounds, like computing the curvature to discard false hits or implement the curvature inside a custom raycaster although this is, unfortunately, quite complicated. I'll think about this.