how to have is trigger on but also have collisions

Code Example - how to have is trigger on but also have collisions

                
                        Attach an empty GameObject to the GameObject and center it to the parent
Add a collider and resize to fit the GameObject
Assign the player and the empty GameObject to a layer
go to Edit > Project Settings > Physics
uncheck collision between player layer and empty collider layer