0

I set the concept of my game to see the two different world and you can go either world by pressing key code.Tab. So when seeing world1, world2 are invisible and can't affect the player. but the problem is when swapping on to other world if player are inside an wall or an object player get stuck inside of it so I want the player to be pushed out of the object that got stuck to it. I tried googling up for an answer but preventing getting stuck from objects that regenerate randomly but that wasn't my case.

It will be pleasure if anyone can give even an idea on how to solve the problem.

Here is the video resource might help you understand my problem. https://www.youtube.com/watch?v=cGz-4gUD-bw sorry for the bad resolution.

6
  • you sure thats the right video? it doesnt seem to match your description at all Commented Aug 17, 2023 at 8:26
  • hmm.. on what point do you mean by that? isn't video showing the problem of getting stuck inside of an object that suddenly got set 'SetActive(true)' Commented Aug 17, 2023 at 8:40
  • the video shows a platform game and some guy running and jumping at a block - it does not show "worlds" or seem to demonstrte swapping between "worlds" Commented Aug 17, 2023 at 8:42
  • for now it is just a prototype of the game and will improve visual effect and others . sorry for the weak explanation. what I'm saying is that if I press 'tab', map placement will change. but on clicking tab key to switch the map. if the player is inside of some certain object, player get stuck. I want the player to get out of an object and tried solving with ontrigger2d but having a hard time with it. Commented Aug 17, 2023 at 8:48
  • I know asking for the whole code is a pressure and won't even help me to improve. so it will be very grateful if you could give me an idea on how to execute Commented Aug 17, 2023 at 8:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.