Cannon launch help

0 favourites
  • 5 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hello, I am working on a game that i am very excited about but i have run into a problem. here is the scenario.

    you press a button to set the power of the launch (how fast the cannon ball travels), then you press a button to set the angle of the cannon. I have that part figured out. I need assistance on how to have a third button that when it is pressed, the cannon ball with shoot out starting from the left, moving to the right, kind of like kitten cannon or toss the turtle physics.

    any and all help is always greatly appreciated. thank you!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Enable bullet behaviour on the cannon ball. Use 'Set Angle Toward' for the direction of the ball.

  • Thank you for the reply, i have never thought to use the bullet behavior, I dont seem to be getting the results i am looking for though. It seems that using the bullet behavior, when i apply force to the cannon ball it continues moving onward even after hitting the ground instead of slowly stopping.

    To clarify, I am looking for a way to shoot the ball using the randomly generated power and angle that i have setup. once that information is input....i need a button that when pressed it will launch the ball at that speed and angle until it hits the ground and slowly comes to a stop.

  • When you say "force", I assume that means you're using the physics behaviour? You should never combine physics with any other movement behaviour, as they have conflicting effects on the object.

    But, I was in the mood to do a simple cannon game using physics, so here you go. This should be more than enough to get you started.

    Up/down/left/right to adjust angle and power; spacebar to launch. Pay particular attention to the physics properties of the ball, such as density, friction and angular damping.

  • Geometrix, i cant thank you enough for pointing me in the proper direction. Yes i have been attempting to combine 8 direction, physics, platformer in many different ways. i have just recently dropped platformer and 8 direction. I am in full physics mode now.

    You have been an immense help, the only thing i could get from my poking at physics has been lulz.

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