CollisionDetection of manual scaling Object (2D)
Hi The main character of the game is a gum which throws a piece of itself which is called anchor in any direction or at any angel.
There is a thread like connection, which is called connection-thread Object, between the gum and its anchors whose elastic structure is implemented using SpringJoin2D which gives the connection-thread a spring-like behavior.
In order to make the connection-thread more dynamic, a mechanism is added to the game which lets the connection-thread to get segmented by adding a new anchor in the part of the connection-thread that collides with an object in the game environment. In other words whenever an object hits the connection-thread a static anchor is added in the collision point.
The main problem:
The connection-thread Object is scaled and positioned manually in the script, which causes dysfunction in the collision detection system(Box2D) in a way that the collision points cannot be detected correctly.
Used Methods :
boxCollider / EdgeCollider -> dysfunctioned when scaling
RayCast2D /LineCast2D -> middle anchors enter the environment Object in high speed
static boxcollider2D in child object in size of maximum length of connection-thread Object -> [not implemented yet]
Any idea to fix this ?