Need quick help

I’m trying to make an object inside of a clip interact with something “outside”
I tried “if(this.object1.hitTest(obj2))){}” and it didn’t work (although I thought
that’s how it’s supposed to be done :disappointed:)

You want to make a clip inside of a clip try to touch something outside of the clip, right? So, in the parent clip, you should write:
if(this.obj1.hitTest(obj2)) {
// code
}

It seems about right to me, maybe it’s just the extra “)” near the end of your line.

The extra “)” was a typo

My code is the exact same as yours

if(this.red.hitTest(test)){
___test.y+=5;
}

Doesn’t seem to work, although I know ur code setup is correct since I’ve used it before

maybe put if(this.hitTest(test) { … } inside “red” (inside the clip) and see if it works.

There appears to be a bug, the hitTest is responding as if the child object (red) has its position relative to the top left of the project, rather than relative to the origin of the parent object (this), I’ll put in a bug report!

1 Like

This might be the fourth bug I encounter
:bug:
I thought I was doing something wrong phew!
thanks @nick
btw I might’ve found another bug, when you select an
object, hold any arrow key with shift for 3 seconds & it
starts getting funky after releasing the keys

(Lags only if you hit the arrow key before shift)

Thanks everyone

1 Like

I explained this bug before, it seems to not have been solved yet.

2 Likes

This video should cover the basics.

2 Likes

:+1:
looks cool, thanks for the video

1 Like

No problem! I actually found my first video I made explaining the bug, it might be more specific and all that stuff.

2 Likes

After seeing what this lag could do,
I think it should stay in Wick longer
since people could use it for shading!

it actually looks kind of interesting :sweat_smile: if we want to have it as shading we should probably make it an option of its own though, otherwise we gotta save and reload every time.

1 Like

I might’ve found out what causes this bug for the most part… though I don’t know if that’ll be much help, here’s a pause button that has the if(project.that.hitTest(project.that)){blah blah, blah} and the hitTest function stops working when I send the pause button to the front, and it goes back to work if I send the ball to the front (btw the ball was in the hitTest code too). I tried messing around with this lag, not many results though.
lag 3

1 Like