Drag and Throw Physics

Get help using Construct 2

Post » Sat Oct 29, 2011 3:39 pm

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
B
15
S
1
G
2
Posts: 62
Reputation: 1,696

Post » Sat Oct 29, 2011 4:17 pm

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.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Sat Oct 29, 2011 4:28 pm

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!
B
15
S
1
G
2
Posts: 62
Reputation: 1,696

Post » Sun Oct 30, 2011 12:02 am

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

http://dl.dropbox.com/u/45711709/angrynerds.capx
B
33
S
6
G
7
Posts: 338
Reputation: 7,424

Post » Sun Oct 30, 2011 2:02 am

Cool example Ize. Lol @ the angrynerd ^^
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Tue Dec 06, 2011 8:18 am

How do you actually go and destroy a joint? I cant find anything about it in the action menu.
B
38
S
13
G
9
Posts: 151
Reputation: 8,437

Post » Tue Dec 06, 2011 7:52 pm

[QUOTE=3DGS] 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[/QUOTE]


Here's an example of a simple catapult



download capx

Hope this helps
B
19
S
6
G
7
Posts: 1,205
Reputation: 7,298

Post » Tue Dec 06, 2011 8:31 pm

Im trying to look at your example @chrisbrobs, but construct is telling me i need the touchmouse plugin, which i have..
B
29
S
12
G
7
Posts: 740
Reputation: 7,849

Post » Tue Dec 06, 2011 9:13 pm

[QUOTE=smitchell] Im trying to look at your example @chrisbrobs, but construct is telling me i need the touchmouse plugin, which i have.. [/QUOTE]

I have removed the touchmouse plugin from the example....it wasn't required.
If you download the capx file it should work ok now.
B
19
S
6
G
7
Posts: 1,205
Reputation: 7,298

Post » Tue Dec 06, 2011 9:23 pm

Thanks :) Nice example, i see a lot of angry birds clones coming soon ;D
B
29
S
12
G
7
Posts: 740
Reputation: 7,849

Next

Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, plinkie and 19 guests