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

[task] Create a Targeting component prototype #51

Open
francy51 opened this issue Mar 3, 2020 · 0 comments
Open

[task] Create a Targeting component prototype #51

francy51 opened this issue Mar 3, 2020 · 0 comments

Comments

@francy51
Copy link
Collaborator

francy51 commented Mar 3, 2020

Should target using raycasts from the attached gameObject's transform.forward (with a height offset)

Targets are attained as GameObjects and filtered by LayerMask

A second component named TargetIndicator attached to the camera will link to the Targeting component. It also raycasts in the camera's (attached gameObject also) forward direction.

From these two components, a target location can be triangulated which an on-screen targeting reticle (just a dot) can follow on the client for visual feedback.

Where the Targeting raycast crosses the TargetIndicator's raycast is where the target will be in worldspace - this is not about selecting characters to show their health bars, that is something different and should live in the PlayerComponent which can manage its own stored targets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant