[SOLVED] Clones hitbox

how do i check to see if a object is hitting another object’s clone?

Wick stores every clone into a clones array. Lets say that you have a player clip and you are cloning an object called myEnemy 3 times. Then, if you want to check if your player is hitting one of those 3 cloned enemies… you do…

for(let enemy of myEnemy.clones) {
    if(player.hits(enemy)) {
        // do whatever...
    }
}

i tried that, but it seems like it only works for the most recent clone

Can you share your example so I can help you better?

Where resides the code for the clones?

i didnt do that yet

I’ll share an example for you…

thanks!
ive been trying to do this for a while

cloneCollisions2-9-2022_21-13-22.wick (2.0 KB)

see… the code of frame 1 layer 1…

Move the blue player using the arrow keys…