Using physics behavior to simulate bullet behavior

0 favourites
  • 5 posts
From the Asset Store
Basketball Practice is HTML5 game written in construct 2 and 3 engine that simulates hooping.
  • Hi. I previously used the bullet behaviour for my projectiles and they worked great. But, I want my bullets to interact with other physics objects, like the ground. And I can't just add physics to the behaviours because the bullet behaviour overrides the physics one.

    So, does anyone know how to use the physics behaviour to simulate the bullet behaviour, like the parabolic path? Or, any other solution?

    Any help is appreciated! <img src="smileys/smiley10.gif" border="0" align="middle" />

  • Give the bullet an instance variable like isShooting, set it to true on creation.

    +isSoothing = true

    +Every Tick

    -> Set Bullet Position lerp(distance) //If you need help with the parameters say it and dont forget dt for bad pc?s

    +On collide Bullet with X

    -> Do whatever you want

    +Bullet is outside Layout

    • Destroy

    This are just basics, if you need more we will need more informations.

  • It depends on how you want it to interact with the other objects. Pinning a physics object to a bullet will give it the ability to affect physics objects. Also, the catapult example is a type of bullet; just get rid of the catapult mechanism. You'll have to experiment with settings for angle/rotation.

  • This are just basics, if you need more we will need more informations.

    I understand all of this, but how do you make the bullet follow a parabolic path?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • With the sine behavior, should I make you an example ?

    You can also use blackhornets way.

    -Create an Invisible Object with a Bullet behavior.

    • Create Object
    • Create bullet (The one with the Physics)
    • Pin Bullet to the Object
    • Fire the Object

    This is easier than my way.

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