-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Camera-Terrain Collision #2470
Camera-Terrain Collision #2470
Conversation
Is it possible to add a test for this? Also, is there a flag to turn on/off collision detection? If so, this should also consider it. If not, I suspect we'll add it at some point, but no need for it now. |
I originally din't think we would need one (and told @bagnell as much) but the more I think about it, the more having an option to disable is probably a good idea. That being said, I'm also okay with holding off until someone asks for it. It's up to you guys. |
@mramato submit an issue. |
We could if we want the tests to wait for terrain to load. Is there any terrain providers in the test code that only loads one hi-res tile? |
…camera is in a reference frame that isn't the world frame.
@mramato can you test and merge? |
* @type {Boolean} | ||
* @default true | ||
*/ | ||
this.avoidCollisionInReferenceFrame = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want this flag to be this specific? Why not just have a boolean that enables/disable collision detection completely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did this because people might not want us to reorient the camera after we detect a collision. For example, they may set the camera reference frame and not look at the center, then, when we detect a collision, it will look towards the center.
I though about adding another flag that enabled/disabled collision detection altogether, but would anyone really want to do that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but would anyone really want to do that?
I suspect yes, at least for subsurface.
@mramato This is ready for another review. |
Conflicts: CHANGES.md
I would get rid of |
Dan, I merged in master again so I could make a build for our other project. |
What's the latest here? |
Conflicts: CHANGES.md
@mramato This is ready for another review. |
Add camera-terrain collision detection/response when the camera reference frame is set. This change assumes that when the camera reference is not earth fixed, the camera is always looking at the center of the frame.
CC #1060, #1936