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 basic collision detection #6

Closed
ellenhp opened this issue May 23, 2015 · 2 comments
Closed

Implement basic collision detection #6

ellenhp opened this issue May 23, 2015 · 2 comments
Assignees

Comments

@ellenhp
Copy link
Owner

ellenhp commented May 23, 2015

Everything should be a capsule or rectangular prism for now.

@ellenhp
Copy link
Owner Author

ellenhp commented May 27, 2015

This should probably all happen on the server. I don't think I'm worried about bullet-through-paper issues for now, but that could change.

Using a brute-force N^2 broadphase should be fine for now since I don't know how to implement anything else in spherical coordinates. But I can't decide on how to represent vessels for the nearphase detection, or whether vessels should be allowed to decide how they're represented (capsule, box, etc).

One thing I'm not concerned with is the performance of the nearphase detection, since that should almost never have to run.

@ellenhp ellenhp self-assigned this May 27, 2015
@ellenhp
Copy link
Owner Author

ellenhp commented May 30, 2015

I think mapping every nearphase detection to cartesian coordinates is the right choice.
X = R * Longitude * cos(Latitude)
Y = R * Latitude
Z = Altitude

This allows traditional geometry intersection tests to be used. A capsule-capsule intersection test should be fairly easy to implement this way. And it'll be close enough. Vessels aren't big enough that it'll matter.

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

No branches or pull requests

1 participant