How to change player

Hello everyone

I’am trying to make a 3d tic tac to game in babylon js with the editor. I kinda managed to make the game field and how a lot of problems with the player managment. I think my concept is kinda wrong i’am trying to make a boolean which changes with every pick on the game field but i can’t get it working.

This is the function so far.

cube1.toggle = true;

    cube1.actionManager = new BABYLON.ActionManager(scene);
    new  BABYLON.SwitchBooleanAction(
    BABYLON.ActionManager.OnPickTrigger, cube1, "toggle")

Pinging @julien-moreau

Hi @OdinSynergy !

Can you try to set the “cube1” mesh with “isPickable = true” ?

1 Like

Yea it is i set it in the editor. Do i need to do some coding aswel in behave of it or is that enough

thanks for the help bye the way