Point in Rect
![point in rect](http://lf16-tiktok-common.tiktokcdn-us.com/obj/tiktok-web-common-tx/effect/learn/assets/images/point_in_rect-b3a98153a7a9ed03bda98258e4a9ef8e.png)
Use Point in Rect to detect whether or not a point is in a rectangle. Point in Rect is in the Utility category.
Input
Name | Data Type | Description |
---|---|---|
Enter | Exec | The input execution that triggers this node. |
Detect Boundary | Rect | The rectangle. |
Detect Point | Vec2 | The position of the point. |
Output
Name | Data Type | Description |
---|---|---|
True | Exec | Execute the next node when the point is in the rectangle. |
False | Exec | Execute the next node when the point is outside the rectangle. |
Example
![point in rect example](https://sf16-va.tiktokcdn.com/obj/eden-va2/vhreh7flszld/large_assets/point_in_rect_example.gif)
![point in rect example](http://lf16-tiktok-common.tiktokcdn-us.com/obj/tiktok-web-common-tx/effect/learn/assets/images/mapping-7ab152df8642750d36024cfe65acbdfc.jpeg)
This example shows that when an area is tapped, the image will be shown. For Detect Boundary, show the Rect in (x,y,w,h), the value mapping above.
![point in rect node](http://lf16-tiktok-common.tiktokcdn-us.com/obj/tiktok-web-common-tx/effect/learn/assets/images/point_in_rect_node-a9a282c910f3c25f93ffe2afad8cfd63.jpeg)