Tag Info

Hot answers tagged

3

Your LevelCollider is attached to a Collider that is a trigger. That means it will not call OnCollisionEnter. It will call OnTriggerEnter. Try adding this to LevelCollider: void OnTriggerEnter(Collider other) { Application.LoadLevel("Level1"); } That should do ya!


2

Your approach is unfortunately not framerate independent. You correctly notice the need to factor in the amount of time passed between each update in your physics calculations. However, you still specify the amount of time passed in units of frames. If your framerate changes, now your speeds have all changed with respect to the passing of real time. What you ...


2

Detect collisions with OnCollisionEnter then load your level there. I.e.: void OnCollisionEnter (Collision col) { Application.LoadLevel("Level1"); } If your character's Collider is a trigger, then you need to use OnTriggerEnter. I.e.: void OnTriggerEnter (Collider other) { Application.LoadLevel("Level1"); } If neither of these work, try ...


2

Clearing the screen is only one half of the puzzle. I'm going to bet you also only re-draw the rectangles if/when they move. To confirm, you could make the red cube continue to move across the screen, I would expect there to be no graphical glitches. The solution: Draw everything (on screen) every frame. There are fancier ways to deal with this, but they ...



Only top voted, non community-wiki answers of a minimum length are eligible