Arrow Physics

Get help using Construct 2

Post » Sun Nov 27, 2011 5:24 pm

Hi, what would be a good way to make an arrow with physics behavior so that it is spawned, moves with character while pressing a button but when releasing button apply a force to it, ie.: Shoots it. Is there a way to turn on physics only when i want ? The way i made it sometimes it shoots correctly sometimes it just falls down. Any ideas ?Kiyoshi2011-11-27 17:28:08
B
58
S
13
G
10
Posts: 632
Reputation: 12,515

Post » Sun Nov 27, 2011 6:05 pm

Why using physics?
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Sun Nov 27, 2011 6:33 pm

Well it's not absolutely necessary but the reason is more realism on motion. I can always rethink gameplay to do without physics anyway. In fact i just had and idea that eliminates the "need" for physics. But it would be good to know anywayKiyoshi2011-11-27 18:35:30
B
58
S
13
G
10
Posts: 632
Reputation: 12,515

Post » Sun Nov 27, 2011 6:53 pm

physics is overrated :D
arrow.capx
Last edited by Yann on Sun Sep 14, 2014 10:57 pm, edited 1 time in total.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Sun Nov 27, 2011 8:20 pm

Nice example ! I'll use some of it's code thanks :) There's one problem with bullet though. If you mark it to bounce on collision it keeps bouncing infinitelly. I don't know if something that i did affected it but it's worth checking.
B
58
S
13
G
10
Posts: 632
Reputation: 12,515

Post » Sun Nov 27, 2011 8:24 pm

Duh, of course it'll bounce infinitelly. I'll cut the momentum on half each time it collides and see how it goes
B
58
S
13
G
10
Posts: 632
Reputation: 12,515

Post » Sun Nov 27, 2011 8:30 pm

Yeah that's a problem. I have two options: Make the arrow always stuck on contact, never bouncing. Or come up with a way to make it bounce and settle on ground correctly when it's speed is low enough.
B
58
S
13
G
10
Posts: 632
Reputation: 12,515

Post » Mon Nov 28, 2011 2:30 am

Stopping it when speed < X definitely makes sense.
B
17
S
5
G
2
Posts: 7
Reputation: 2,263

Post » Mon Nov 28, 2011 1:07 pm

Yeah bullet is a bit unstoppable :) But now that enabled/disabled was added it can be worked around more easily
B
58
S
13
G
10
Posts: 632
Reputation: 12,515


Return to How do I....?

Who is online

Users browsing this forum: Callan S, getplay, Kagubro and 20 guests