How to hide shape behind objects
Hi, i would like to not see this cone behind my sphere but i don't know how to do that :
Any idea ?
Hi, i would like to not see this cone behind my sphere but i don't know how to do that :
Any idea ?
If the cone and the sphere are drawn with Shapes you can take a look at this section in the documentation.
If one of the Object is not a Shapes object you can use the Draw.ZTest property. It has different possible settings:
(Draw.ZTest = CompareFunction.LessEqual, Draw.ZTest = CompareFunction.Always, ...).
Ok thanks for this, i will look at it, i have another question , do you know how we can play with color mask parameter, i want to disable the green part :
I have no experience yet witch the Color Mask parameters. However I found something in the Unity documentation after a quick search. It mentions the color channel parameters and some example code.
Maybe this helps.
I have no experience yet witch the Color Mask parameters. However I found something in the Unity documentation after a quick search. It mentions the color channel parameters and some example code.
Maybe this helps.
It 's a shape parameter, not a unity one.
I have this function, i think i have to use it but i don't know how :
It's not working :
I have this function, i think i have to use it but i don't know how :
It's not working :
I see.
If its an enum you have to assign it to something. If you want to leave out only the Green part you can do something like bitwise OR:
YourShapesProperty = ColorWriteMask.Alpha | ColorWriteMask.Blue | ColorWriteMask.Red;
I see.
If its an enum you have to assign it to something. If you want to leave out only the Green part you can do something like bitwise OR:
YourShapesProperty = ColorWriteMask.Alpha | ColorWriteMask.Blue | ColorWriteMask.Red;
Oh ok, i see , but what is 'YourShapesProperty', is there any way to have an access to this ?
Oh ok, i see , but what is 'YourShapesProperty', is there any way to have an access to this ?
Because i want to change it for my cone component which is defined like that : private Cone cone;
Because i want to change it for my cone component which is defined like that : private Cone cone;
Ok i found it, thanks for this.
If the cone and the sphere are drawn with Shapes you can take a look at this section in the documentation.
If one of the Object is not a Shapes object you can use the Draw.ZTest property. It has different possible settings:
(Draw.ZTest = CompareFunction.LessEqual, Draw.ZTest = CompareFunction.Always, ...).