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

Implement support for directional armor #9268

Closed
reaperrr opened this issue Sep 5, 2015 · 4 comments · Fixed by #14991
Closed

Implement support for directional armor #9268

reaperrr opened this issue Sep 5, 2015 · 4 comments · Fixed by #14991
Labels

Comments

@reaperrr
Copy link
Contributor

reaperrr commented Sep 5, 2015

A possible, relatively simple approach would be to compare the projectile facing right before explosion with the facing of directly hit actors (explosion happened inside their health radius / hit box / whatever).

If the projectile facing exactly matched or diverted by no more than X degrees, it must have hit the weak rear armor, giving a damage bonus.
If the facing was the opposite, it must have hit the front, reducing the damage.
In between it must have hit the sides, so apply normal damage.

This is just a possibility. If we had a raycaster and rectangular hit boxes, it would be possible to check more accurately what side was hit.

@Unit158
Copy link
Contributor

Unit158 commented Sep 5, 2015

A raycaster for hit detection happens to be a really bad idea. We need proper collision detection. This could also be implemented with some relatively simple trigonometry.

On 2015-09-05, at 9:21 AM, reaperrr notifications@github.com wrote:

A possible, relatively simple approach would be to compare the projectile facing right before explosion with the facing of directly hit actors (explosion happened inside their health radius / hit box / whatever).

If the projectile facing exactly matched or diverted by no more than X degrees, it must have hit the weak rear armor, giving a damage bonus.
If the facing was the opposite, it must have hit the front, reducing the damage.
In between it must have hit the sides, so apply normal damage.

This is just a possibility. If we had a raycaster and rectangular hit boxes, it would be possible to check more accurately what side was hit.


Reply to this email directly or view it on GitHub.

@reaperrr
Copy link
Contributor Author

reaperrr commented Jan 1, 2016

#9800 might be a big step towards making this easier.

For example, for rectangular shapes we could simply check which edge is closest to the center of impact, if I'm not mistaken.

@Unit158
Copy link
Contributor

Unit158 commented Jan 1, 2016

Unfortunately, I don't think it really is. The edge detection doesn't provide direction, and could probably be done fairly simply with some vector subtraction and wangle work, but I need a sanity check to be sure.

On 2016-01-01, at 10:02, reaperrr <notifications@github.commailto:notifications@github.com> wrote:

#9800#9800 might be a big step towards making this easier.

For example, for rectangular shapes we could simply check which edge is closest to the center of impact, if I'm not mistaken.


Reply to this email directly or view it on GitHubhttps://github.com//issues/9268#issuecomment-168312282.

@ghost ghost changed the title Implement support for directional armor Implement support for directional armor [$40] Jan 1, 2016
@ghost ghost added the Bounty label Jan 1, 2016
@Unit158
Copy link
Contributor

Unit158 commented Jan 5, 2016

I am working on this.

@Mailaender Mailaender removed the Bounty label Nov 10, 2016
@Mailaender Mailaender changed the title Implement support for directional armor [$40] Implement support for directional armor Nov 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants