I’m assuming this is a common problem because I ran into the same thing in the platformer I’m working on. In my case, I wanted to have physics variants of my collectibles that bounced off the ground instead of hovering mid-air, but I also still wanted the player to interact with them via a trigger instead of a collision.
The solution I came up with was simple:
Keep your “base” object exactly like it is, and create an empty (child) Game Object underneath it. I named my child object “Solid Collider” to make it clear what its purpose was, but you can name yours whatever you want.
Next, (1.) give your child a Box Collider with the same dimensions as the parent’s collider (and be sure “Is Trigger” is NOT checked), and (2.) assign your child object to a layer that only handles ground collisions.
In case you aren’t familiar with layers, they basically let you determine which OTHER layers an object can collide with. To assign a layer to an object, click the “Layers” dropdown box in the upper-right corner of the Inspector. To specify which layers your selected layer interacts with, modify the collision matrix located at the very bottom of Edit->Project Settings->Physics 2D (be sure to click “Physics 2D,” and not “Physics”!).
In my game for example, my ground tiles/objects are assigned to a “Ground” layer that interacts with most other layers, and my physics collectibles’ (solid) child object is assigned to a “Ground Col Only” layer that literally ignores every layer BUT the Ground layer, meaning the collectibles will pass right through colliders belonging to enemies, random objects, etc. and will only ever bounce off the ground.
Here’s a simple example of how each of my physics collectibles is structured in the heirarchy:
Base Object [Trigger Collider – Default Layer]
----> Child Object [Solid Collider – “Ground Col Only” Layer]
There may be an even better method out there, but this has worked quite well for me and is really easy to set up. Try it out and let me know how it works for you. Hope this helps!