Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add trace ray ground Lua functions #1706

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add trace ray ground Lua functions #1706

wants to merge 1 commit into from

Conversation

sprunk
Copy link
Collaborator

@sprunk sprunk commented Sep 29, 2024

Extracted from #1624.
Depends on #1705.

@sprunk sprunk marked this pull request as draft September 29, 2024 13:38
@sprunk sprunk marked this pull request as ready for review October 6, 2024 12:08
@saurtron saurtron added the candidate PRs that should be good to go or important for next release label Dec 16, 2024
@saurtron
Copy link
Collaborator

saurtron commented Dec 16, 2024

rebased

@saurtron saurtron removed the candidate PRs that should be good to go or important for next release label Dec 16, 2024
@saurtron saurtron self-requested a review December 16, 2024 17:58
@saurtron
Copy link
Collaborator

oops added some comments before that were actually for #1624

sorry, so many traceray PRs XD

will test this one soon too

@saurtron saurtron added the candidate PRs that should be good to go or important for next release label Dec 16, 2024
saurtron added a commit to saurtron/Beyond-All-Reason that referenced this pull request Dec 16, 2024
Copy link
Collaborator

@saurtron saurtron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a small nipick, otherwise I found this to work fine.

Created the following widget to test: dbg_gui_test_ground_rays.lua

  • Start skirmish
  • Enable widget "TestRays Ground"
  • Click somewhere, you will get:
    • echo of ground intersection
    • echo of water intersection
    • also calculate ground intersection with raybetween to see it gives the same result
    • do ray between first two selected units and send the first to attack ground the found position with some offsets in y so its likely to find the middle point
      • if not nselected == 2, then it will just get the first unit from AllUnits, and do a ray intersection to the clicked point, offseting ground.y +10, and unit.y -10, send it there to attack ground.
  • tells you the water depth inferred from both water and ground rays

rts/Lua/LuaSyncedRead.cpp Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
candidate PRs that should be good to go or important for next release Lua API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants