How to make click to change wall colors or texture using drag and drop material

Hello i need to create a assaignment that when i open playcanvas runtime their is a room and i have a many different colors and texture in my menu option i just pick the color or texture and drag and drop to the wall that will apply the perticular choice.

Tell me the logic i am also giving the url of that assaignment it is VR but i have to make it simple in playcanvas

Hi @rehman97,

So to do that you will need to implement a number of things:

  1. Keep your model geometry as separate modular pieces. This way you can easily select/update part of your model (e.g. a wall or floor).

  2. Implement an entity picking system, there are several examples here: Tutorials | Learn PlayCanvas

  3. As soon as you have your picked entity available in code, you can get access to the render component material and update or replace it. This examples demonstrates that:

brother sorry i didnt get i had created a simple design and camera firstperson movement setting done it,

now the second thing is that i want if i click right side of mouse to the any object like wall or floor so the new small gui open where are some colors and texture already thereā€¦

then third thing is that when i select any color or texture it will apply plz help for second and third sir?

here i am creating you may check the project