Feature: Use child colliders by mikegeig · Pull Request #227 · Unity-Technologies/PostProcessing · GitHub
Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Feature: Use child colliders#227

Open
mikegeig wants to merge 4 commits into
v2from
Feature_Use_Child_Colliders
Open

Feature: Use child colliders#227
mikegeig wants to merge 4 commits into
v2from
Feature_Use_Child_Colliders

Conversation

@mikegeig

Copy link
Copy Markdown

I added the ability to use children objects and have their colliders apply to the post processing volume. I also added the required Inspector toggle and gizmo functionality. This is very useful as it allows you to more easily place volumes by moving game objects around instead of moving the center points of colliders. Additionally, you can now rotate colliders by rotating the child game objects. Finally, you can also more easily organize and label the parts of your volume as the colliders are components on separate game objects.

unity_2017-07-31_17-19-00

@mikegeig mikegeig changed the title Feature use child colliders Feature: Use child colliders Jul 31, 2017
@mikegeig mikegeig requested a review from Chman July 31, 2017 21:23
@Chman

Chman commented Aug 10, 2017

Copy link
Copy Markdown
Contributor

@mikegeig

Copy link
Copy Markdown
Author

Hmm, I'm not sure I agree. In my opinion:

  • Performance: do we have a speed comparison of GetComponents versus GetComponentsInChildren? If not, I may have to benchmark that

  • UI Noise: certainly this is an understandable concern, but I believe this change would be of great use and far worth a single line addition to the component. One of the great advantages of our post fx stack is the ability to create custom volume shapes by stacking colliders. I feel this advantage is hinders by the "clunkiness" of manipulating multiple colliders on a single object. It also doesn't address the fact that rotating colliders is impossible without this feature

  • UX incoherencies: I can agree with this one, however I think this simply adds another way of working with the tool and more options for developers. Obviously, some code could be added to make it perform similar to a canvas, in that a canvas controls all child elements until another canvas is encountered in the hierarchy.

I guess I feel that using child colliders will be more popular than you indicate. I already use this version in many of my projects and the ability to easily move and rotate colliders as child objects (not to mention visualize them with a mesh renderer during prototyping) has been incredibly helpful. The entire reason I built this version is because I was trying to easily add a volume to a racetrack tunnel that was a part of a twisted spline. I was getting frustrated trying to get cubes to line up with a curved track. Using a mesh collider and increasing its blend distance also wasn't an option as the pivot of the mesh was perfectly centered (nor could it be with the shape). This solution solved the problem very quickly. Sure, it might add a UX quirk (though, could be cleaned up), but it improved my experience with the tool in many occasions by quite a lot.

@mikegeig

Copy link
Copy Markdown
Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants