#2832: Raycast function is incorrect
----------------------------+-------------------------------------
Reporter: Safety0ff | Owner:
Type: bug | Status: new
Priority: normal | Milestone: unspecified
Component: Engine: other | Version: unspecified
Keywords: | Operating System: All/Non-Specific
Blocked By: | Blocking:
----------------------------+-------------------------------------
The raycast function takes constant steps to traverse the grid, this might
cause issues because it can skip over tiles, or call the callback twice
for the same tile.
I've attached an image to better explain the issue:[[BR]]
* The black lines are rays which are cast from the lower left.
* The grid is there to be representative of map tiles.
* The bottom ray represents the current implementation.
* The top is what a proper implementation might behave like.
* The red segments of the bottom ray are omitted tiles
* The purple segments show a tile being returned twice.
* The yellow spots on the top ray are examples of positions which the
correct function might return.
Note: the raycast function is meant to return a world space position once
per tile the ray intersects.
I've started working on something which would implement the top ray, but
it is not working correctly atm. and I will be putting it aside for now
(this ticket is so that this issue doesn't go back into hiding.)
--
Ticket URL: <http://developer.wz2100.net/ticket/2832>
Warzone 2100 Trac <http://developer.wz2100.net/>
The Warzone 2100 Project
_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev