- Home /
Understanding game structure
Hi, I'm learning c# and unity, lockdown boredom but I'm having a lot of fun .
I'm not necessarily looking for the answer to my problem more to what question to ask .
If I have a scene in a 2d platfomer and around half way through I have a disappearing platform , it doesn't need to be disappearing and reappearing until the player comes near to it. Same with say a Goomba style enemy , it doesn't need to be patrolling when the player is at the other half of the scene .
Is it some sort of trigger related to the camera position for example ?
Any tips on where to start my search or give me a tip as to what type of solution I should be looking.
Any advice would be gratefully received.
Thanks
Answer by sacredgeometry · Dec 22, 2020 at 03:01 AM
Frustum Culling stops you rendering things that are outside of the cameras frame.
If you want to (and if your camera pans on the horizontal axis like Mario) add in other optimisations you can dynamically load assets into position slightly ahead of your cameras position.
Have you looked into object pooling?
Thanks for taking the time to answer it gives me a great start
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Rotating player relative to the camera (Unity C#) 1 Answer
How can I create vertical camera movement?,How can I make vertical camera movement? 1 Answer
How can I limit the rotation on the Y axis so the player cant spin the camera 360 in an FPS game? 1 Answer