I need help with hits

Is there a way to accomplish what I’m trying to do within this wick file?

hitsProblem4-30-2021_12-32-07.wick (14.5 KB)

Edit: (It looks like the collision box is similar to a full square when the tree is diagonal).
I’m not sure if we can achieve it with the other hits mode, but I haven’t used that yet…

1 Like

i dont really know huats going wrong 1 sec ill turn the code into a clip and see if that works

ok didn’t help at all

Thank you for trying. Im thinking now to use some small hidden squares to set them as colliders, but this could lower the performance.

1 Like

so i think i figured out how the 2 collide.

hits() checks like the one on the right, not on the left. this is what makes the weird collision.

frames 10-16 show an example of the process. frame 1 is the original.

hitsProblem4-30-2021_10-51-22.wick (17.2 KB)

what you might need to do is use some math (instead of built-in wick stuff) to check the collision based on width, height, and rotation of the 2 objects. i’m sure google or stack overflow will help.

2 Likes

Yes you are right, I knew that that was the problem… I’m wondering if @Hamzah_Alani, could show me how he did it for the “motorcycle” demo… I’m pretty sure he was using slopes… not sure if left the wick project somewhere…

(Edit)
Yes he did:

3 Likes

This is what I end it up doing…

It will work only on 1.19.4

hitsProblem4-30-2021_15-38-54.wick (15.8 KB)

2 Likes

where do you use 1.19.4

1 Like