feat: Add raycasting from players perspective.#786
Open
Saskyc wants to merge 4 commits intoExMod-Team:masterfrom
Open
feat: Add raycasting from players perspective.#786Saskyc wants to merge 4 commits intoExMod-Team:masterfrom
Saskyc wants to merge 4 commits intoExMod-Team:masterfrom
Conversation
Mr-Baguetter
approved these changes
Mar 26, 2026
Mr-Baguetter
left a comment
There was a problem hiding this comment.
Looks good to me.
I dont see any obvious issues.
louis1706
requested changes
Mar 26, 2026
Comment on lines
+4012
to
+4019
| /// <summary> | ||
| /// Gets the player currently looking at if any. | ||
| /// </summary> | ||
| /// <param name="maxDistance">The max distance the raycast can reach.</param> | ||
| /// <returns><see cref="Player"/> if any.</returns> | ||
| public Player GetRaycastedPlayer(float maxDistance) => | ||
| Get(GetRaycast(maxDistance, LayerMasks.Player)?.collider); | ||
|
|
There was a problem hiding this comment.
you need to get the Player from HitBox
Author
There was a problem hiding this comment.
Will be done thank you for bringing this up.
…ad of "Player" as Yamato suggested
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… or anything in layer mask.
Description
Describe the changes
Adds new method to raycast from players CameraTransform.
Either for anything with layermask or for player & hitbox with predefined layermasks.
What is the current behavior? (You can also link to an open issue here)
What is the new behavior? (if this is a feature change)
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
None.
Other information:
Types of changes
Submission checklist
Patches (if there are any changes related to Harmony patches)
Other