This is the plan that needs to be done:
2 BOXES - one box has force that is moving it, second box has no force
FIRST box is pushing (using normal unity physics) SECOND box into the teleport.
SECOND box needs to have continuous moving when it’s teleported.
PROBLEM:
When second box enters teleport it is moved to the location of the other side of the teleport and it stands there because there is no FIRST box to push it. So After SECOND box, FIRST box enters teleport and it is moved on the same location where the 2 box is and Unity physics makes some uncontrolled moves (first box when appears at the same position as the 2nd box is pushed into the air because physics doesn’t allow 2 objects to have the same position).
Top sketch shows TOP VIEW of the current situation 1.st Box with force pushes Box without force into the teleport, Box2 is teleported and then Box1 is teleported at the same position as Box2.
Bottom sketch shows how I want it to be done, box2 is constantly pushed out of the teleport
Not sure if this would work…
My strategy would be to instantiate a new object when it is in the middle, and delete the last one after it is out of the portal… and in the previous one assign the velocity of it to a variable, and then apply that velocity again to the new object.
BLUE BOX is pushing WHITE BOX 1 into the teleport, and then it’s clone WHITE BOX 2 is instantiated at the correct point in the other side of the portal. white boxes don’t have force, they are pushed around.
WHITE BOX 2 is CHILD of WHITE BOX 1 because I wanted to get the same movements for the both boxes (when BOX1 is pushed, BOX2 is pushed too in the same direction and with same force)
THE PROBLEM:
PROBLEM is
That WHITE BOX 2 is not moving at all even if it’s child of W.BOX1 and W.BOX1 is pushed
(pushed rigidbody moves, but it’s “Child” object isn’t moving same way)