Collision detection and resolution with iPhone X display
$30-250 USD
Closed
Posted about 5 years ago
$30-250 USD
Paid on delivery
The goal is rather simple.
Given a 2D circle, its position this frame (p1), its position last frame (p2), and its radius resolve its collision with the edges of an iOS device screen.
The goal is that the position the circle was when it first collided with the screen edge on its way from p1 to p2 is calculated and its velocity is calculated based off of the normal.
The solution needs to be extremely fast as a few thousand entities need to calculate this collision every frame.
This needs to work for both rectangular phones and iPhone Xs. Now when it comes to the iPhone Xs you are free to approximate its geometry down to circles and edges BUT make it general if you do so. For example if you use a semicircle to approximate the rounded corners then the position and size of that semicircle needs to be editable in case of future phones.
In summary fill in the following function:
struct float2{
float x;
float y;
};
void collideWithEdge(float2& position, float2 last, float size, float2& velocity, ScreenType type) {
}
Your solution must be fast and efficient and written in a general way so that future curved displays can be covered to as well as larger iPhone X type screens. Additionally please make lots of helper methods and use those to build up their solution especially if you are doing specific kinds of collision detection.
Please contact me for more details thanks.
Dear
As I am mobile and web expert, have rich experience with mobile app development
If you are interested with my proposal, please let me know it.
I hope to work with you on this project.
Thanks.