hitTest with child Objects

Considering the following picture… I’m trying to do a hitTest of the wall against the player.yellow. It is not working for me… Is there a way to accomplish this without having to separate both objects?

image

Here is what I tried so far…
image

Does anyone tried that before?

Here is the project…
My Project10-28-2020_9-52-51PM.wick (2.2 KB)

Lets summon savvy’s… @Hamzah_Alani, @pumpkinhead, @awc95014, @bluecake or someone that has the answer…

never tried, don’t have time rn to experiment :frowning:

Understand. Thank you anyway. I’m just try to simplify my life… but I’m not sure if its possible.

I’m looking into it at the moment, I don’t know the answer off-hand but I’ll be sure to let you know if I find a solution. It might also be a bug, possibly.

1 Like

Thank you for trying!

I have not a solution for your question but I’d like to point out that often hittest is not the best solution to use
hittest is quite intensive on processing load
for many games controls over relative distance or a grid based system where quads are forbidden to walk to are more efficient and avoid crippling the game

This is a bug:

2 Likes

I had a suspicion it was a bug, because the paper.js reference says that hittests are supposed to work on groups, so it should work on both a parent object and its child. Luca did mention there would be work done on hittests in the next editor update, so I guess we can hope this issue is resolved in the new release as well.

1 Like

@Luxapodular, any comments about this? Since I know that your team is working on the new hitTest, Could you please verify if this scenario would be available…?

1 Like