Rotate Rectangle(Join) 2D.Rectangle

Hey,

I want to rotate the 2D.Rectangle like the visible Graphics.Skia.Layers - Rectangle. I want to change the Intersect 2D.Collision Bang in a little 2D-game.
I am thinking of a rotating rectangle that you have to avoid, or resigned.
somehow possible?

Regards

Hit test is usually done by applying the inverse rectangle transformation to the point to hit test and don’t apply any transformation to the hit test rectangle.

There are HitTest nodes in VL.Addons.2D.

HitTest (Skia).vl (17.1 KB)

Ok thats good for something.
But what if I have two shapes and want something happens when touching the object boundaries. Like some 2D Polygons. There is no simple way to do this, right?

Moving the goalposts…

Check out VL.Polytools IIRC it comes with hittesting for polygons.

Yes the IntersectPolyPathContours - Node of VL.Polytools could be helpful. I will try.
ThankYou!

Like here:

CollisionPoly.vl (29.8 KB)