Opacity Map & Mouse position problem

Hi Everyone, hope you guys are doing well.

I am trying to build a mechanic where I want to hide the front 3D model to reveal the model which is hidden by this front model.

My Approach:
I am editing the opacity map of the front model which is white by a decal of some radius to black under my mouse position.

Mouse position and position where my decal (to turn white opacityMap to black) is not in the same position. I tried multiplying/dividing by scale and device pixel ratio button nothing seems to work.

Help will be really appreciated :slight_smile:

Here is a sample project:PlayCanvas 3D HTML5 Game Engine

Hi @Faiq_Laiq,

I think you are looking for the best way to convert world to uv coordinates. The character damage demo, updated by @LeXXik to work in the latest engine version, does something similar:


Thanks for the help @Leonidas . I have sorted this with some shaders and a different approach :slight_smile:

1 Like