Skip to content
Snippets Groups Projects
Commit b1d9510f authored by benxidosz's avatar benxidosz
Browse files

Platform generator and FellOff fixes:

felloff -> when camera falling it wong go horizontal.
Platform Generator -> the first platform spawn above the player
parent fd010ea6
No related branches found
No related tags found
No related merge requests found
......@@ -54,7 +54,7 @@ public class GameManager : MonoBehaviour {
Instance = this;
basic_platform = platforms[0];
last_platform_height = player.gameObject.transform.position.y - max_y_offset;
last_platform_height = player.gameObject.transform.position.y + min_y_offset;
// Generaljuk le az elso par platformot
while (Camera.main.orthographicSize * 2 > startPlatformsHeight) {
......
......@@ -40,7 +40,7 @@ public class Main_camera : MonoBehaviour
_rb.velocity = Vector2.zero;
}
} else if (falling) {
_rb.velocity = player.Rb.velocity * 1.5f;
_rb.velocity = new Vector2(0, player.Rb.velocity.y * 1.5f);
if (playerTransform.position.y - 3 * _ortogrphicSize / 4 >= transform.position.y) {
falling = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment