Drag and Throw Physics

0 favourites
From the Asset Store
Throw daggers and hit the most fruit! Watch out for the wind, if you run out of daggers you'll lose the game!
  • Hi i am new to construct 2, and let me begin by saying how much i enjoy this program and how simple and in-depth it is.

    I am trying to create a typical physics game involving the same drag backwards and shoot feature that games like angry birds has, I have been having a lot of trouble creating this in events with the backwards motion to shoot forward. Any help with this will be greatly appreciated, i tried to find some tutorials on this but i was unsuccessful, please direct me to one if i missed it. Thanks in advance!

    Ryan

  • You have the two "officials" tutorials about physics : here for the basics and there for the advanced technics.

    I think that you would have to create a distance joint between the pole the rubber is tied to and your "bird" when you click it at first. Then as long as you're draging it, you would stock the distance and the angle between the bird and the pole in two variables.

    On release you would destroy the distance joint (that was meant to prevent you from dragging the bird too far away) and apply an "impulse toward an angle" on the bird.

    The impulse "force" would be the distance you stocked and the angle would be the angle you stocked.

    I suppose this is the general idea.

  • I just read both of those tutorials, thank you for your fast response i did not think of making and destroying the joint that is a great idea and i will let you know how it goes. Thanks again!

  • Combine this with the actions mentioned by Kyatric and it should do the trick :D

    dl.dropbox.com/u/45711709/angrynerds.capx

  • Cool example Ize. Lol the angrynerd ^^

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • How do you actually go and destroy a joint? I cant find anything about it in the action menu.

  • Hi i am new to construct 2, and let me begin by saying how much i enjoy this program and how simple and in-depth it is.

    I am trying to create a typical physics game involving the same drag backwards and shoot feature that games like angry birds has, I have been having a lot of trouble creating this in events with the backwards motion to shoot forward. Any help with this will be greatly appreciated, i tried to find some tutorials on this but i was unsuccessful, please direct me to one if i missed it. Thanks in advance!

    Ryan

    Here's an example of a simple catapult

    <img src="http://dl.dropbox.com/u/22173473/catapultpic.png" border="0">

    download capx

    Hope this helps

  • Im trying to look at your example chrisbrobs, but construct is telling me i need the touchmouse plugin, which i have..

  • Im trying to look at your example chrisbrobs, but construct is telling me i need the touchmouse plugin, which i have..

    I have removed the touchmouse plugin from the example....it wasn't required.

    If you download the capx file it should work ok now.

  • Thanks :) Nice example, i see a lot of angry birds clones coming soon ;D

  • Thanks chrisbobs, your catapult project is helping me alot.

    I've been trying to add a launch guide upon dragging the pole back. The guide is a long, straight arrow sprite that should stretch out further when the catapult is drawn further back.

    Been tweaking the position/angle/width of the 'elastic' sprite just to test, but I still can't arrive at the right formula.

    Can I get some help on like arriving at a solution?

  • Thanks chrisbobs, your catapult project is helping me alot.

    I've been trying to add a launch guide upon dragging the pole back. The guide is a long, straight arrow sprite that should stretch out further when the catapult is drawn further back.

    Been tweaking the position/angle/width of the 'elastic' sprite just to test, but I still can't arrive at the right formula.

    Can I get some help on like arriving at a solution?

    Try this:

    <img src="http://dl.dropbox.com/u/22173473/catapult%20arrow.png" border="0" />

  • The Link Is BRoken! <img src="smileys/smiley6.gif" border="0" align="middle" />

  • Link iS Broken <img src="smileys/smiley5.gif" border="0" align="middle" />

  • New link

    Catapult2

    If its 'dragging and throwing' your looking for try this as well-

    EXAMPLE CAPX

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