best way to make a simple gravity object

0 favourites
  • 9 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • What i want to achieve is a bullet shell coming out of your gun when you shoot. I would do this by making the sprite having a random velocity and direction on it's creation and having some basic gravity so it falls to the floor.

    Which is the best way to do this? I applied the phisycs behavior but it's too complex for my understanding. Making it plataform and avoiding the collision with the floor?

    Is there a way to add it some simple gravity behavior and velocity?

  • The way I would do this is with the physics behaviour. Gravity drop stuff is all within that. I think it's fairly basic, just adjust the settings and have a play around : D

  • The bullet behaviour itself has gravity.. Why use another way to make a bullet?

  • it worked with the bullet behavior (it wasn't a bullet! It was a bullet SHELL), but it worked perfectly :D

    I made it bounce of solids and it gives a nice effect. But is it possible to decrease the bounce so every time it bounces it does it a little less like real life physics? or is it too complex?

  • Something like on collision with another object, increase friction

  • you could either set a negative value for acceleration or decrease speed on collision.

  • I can't find the way to decrease speed on collision. I only can "set" the speed I want. I guess an expression is needed to compare the actual speed of the sprite and multiply it by 0.5 or something. But I don't know how that's formed... <img src="smileys/smiley26.gif" border="0" align="middle" />

  • on collision -set speed: self.bullet.speed - 10

    or any other number

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • greatttttt <img src="smileys/smiley10.gif" border="0" align="middle" />

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)