How To Give Enemy Physics Property?

Discussion in 'How Can I...?' started by User, Jul 29, 2016.

  1. User

    User Boxer

    Joined:
    Jul 26, 2016
    Messages:
    39
    Likes Received:
    3
    I want an enemy patrolling as like in this Mario game(see the image). It should fall from up platform to down one. I tried to give object type physics but that didn't help me.
     

    Attached Files:

    • img.png
      img.png
      File size:
      2.8 KB
      Views:
      18
    khalijo likes this.
  2. Massi

    Massi Boxer

    Joined:
    May 9, 2016
    Messages:
    37
    Likes Received:
    49
    Hi,
    In the world setting take Friction low like 5/10.
    In the game set the object like Enemy and Object type Physics, give it a linear velocity so it move right or left.
    Use the Logic Transform to change Enemy direction.
    Hope it helps.
     
  3. User

    User Boxer

    Joined:
    Jul 26, 2016
    Messages:
    39
    Likes Received:
    3
    Thanx Massi, I tried the solution which u gave but what i want is if enemy is moving left to right and the platform is not there it should fall to down platform nd continue to move right side.
     
  4. carlosabreu1981

    carlosabreu1981 Boxer

    Joined:
    Jan 13, 2016
    Messages:
    92
    Likes Received:
    38
    the answer is the same
     
  5. Massi

    Massi Boxer

    Joined:
    May 9, 2016
    Messages:
    37
    Likes Received:
    49
    Yes i understand, i try to explain again. Try to move an enemy on a platform to the right and at the end of platform change direction to the left with logic transform, and at the other side a transform logic that change direction to right. If friction is to high the enemy doesn't move.
    Now if your enemy is moving and change direction like you want, try to remove one transform logic and put another platform, this enemy now fall down on the other platform, here you have to put a logic transform to change direction or no if you want that this enemy continuously fall down. Remember that low number in friction is important. I hope it helps
     
    User likes this.
  6. User

    User Boxer

    Joined:
    Jul 26, 2016
    Messages:
    39
    Likes Received:
    3
    Thank again Massi. Enemy falling to down platform but don't know it is flipping.
     
  7. Massi

    Massi Boxer

    Joined:
    May 9, 2016
    Messages:
    37
    Likes Received:
    49
    See the image below.
     

    Attached Files:

    User likes this.
  8. User

    User Boxer

    Joined:
    Jul 26, 2016
    Messages:
    39
    Likes Received:
    3
    I got what you r saying but see what is my output. I don't want transform logic in second platform.
    Screenshot-1920x1080-2016-08-02-09.26.46AM.png Screenshot-1920x1080-2016-08-02-09.26.45AM.png
     
  9. Massi

    Massi Boxer

    Joined:
    May 9, 2016
    Messages:
    37
    Likes Received:
    49
    ok now i understand the problem, your character fall down but rotate because is physic based. See the new image below, take your enemy fixed and use transform logic to change direction.
     

    Attached Files:

    khalijo and User like this.
  10. User

    User Boxer

    Joined:
    Jul 26, 2016
    Messages:
    39
    Likes Received:
    3
    Thanx a lot Massi. This solution solved my problem. :)
     
  11. Massi

    Massi Boxer

    Joined:
    May 9, 2016
    Messages:
    37
    Likes Received:
    49
    You are welcome :)
     
  12. khalijo

    khalijo Boxer

    Joined:
    Mar 28, 2018
    Messages:
    1
    Likes Received:
    0
    thx a lot your are a genuis :)
     

Share This Page