Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Les2316nandhu@gmail.com

3
Posts
1
Following
A member registered Aug 19, 2020

Recent community posts

Ayus use this code to get a perfect geometry dase

  1. using UnityEngine;
  2. using System.Collections;
  3. public class PlayerController : MonoBehaviour {
  4. public float speed;
  5. public float jumpPower;
  6. private Rigidbody2D body2d;
  7. private bool grounded = false;
  8. // Use this for initialization
  9. void Start () {
  10. body2d = <span class="kwd" <this<="" span="">>span class="pun">.</span>GetComponent<Rigidbody2D>();
  11. }
  12. // Update is called once per frame
  13. void FixedUpdate () {
  14. body2d.velocity = Vector2.right * speed;
  15. if (Input.GetMouseButton(0) && grounded)
  16. {
  17. body2d.AddForce(Vector2.up * jumpPower);
  18. }
  19. }
  20. private void OnCollisionStay2D(Collision2D collision)
  21. {
  22. if(collision.gameObject.tag == "ground")
  23. {
  24. grounded = true;
  25. }
  26. }
  27. private void OnCollisionExit2D(Collision2D collision)
  28. {
  29. if (collision.gameObject.tag == "ground")
  30. {
  31. grounded = false;
  32. }
  33. }

 

Note: Searched internet for hours and finally get it i will give the link to https://answers.unity.com/questions/1194202/jump-like-geometry-dash-game.html.   Bring it on next update and yeah thank me later. Love from India

A game which free to play gamer can afford thanks ayus...


Love it bro.