Rectangle - with position, orientation and size that can be intersected with Ray and other Shapes.
Like with BoundingBox and few other shapes, it would be good to have a rectangle, that is much simpler shape than box, and would be useful in many cases.
It would have position, rotation and size (not halfExtents please). And would have functionality to check if it intersects with ray or other shapes.
Is this as straightforward as adding 'rectangle.js' in 'engine/src/shape' following the practices in the shapes in that directory? For clarification; you're asking for a rectangle, not a rectangular prism, yeah?
I'd also add a circle.
(not halfExtents please).
That would make it harder to switch between rect/existing aabb. I would keep the halfExtents approach (or change both).
@Maksims I am new to contributing to open source projects. However, this is my approach in solving the issue:
Step-1: Creating a rectangle.js in the src/core/shape to define the Rectangle {} class
Step-2: Exporting Rectangle {} class in src/index.js
Step-3: Adding rectangle.test.js file in test/core/shape to add four Rectangle {} class-specific test cases
Step-4: The Result -> As a result, 1580 + 4 (Rectangle {} class) test cases are passed.
Can you assign me this issue? Also, can I generate the pull request for the issue?
@Maksims The Vercel deployment check fails due to missing authorization, since I’m an external contributor. Please let me know if I need to do anything else.
Your PR will be picked up and reviewed by one of the PlayCanvas staff when they have time. I'm an outside contributor just like yourself.