Bullet Penetration!

Get help using Construct 2

Post » Thu Jan 16, 2014 12:55 am

Hey Constructors;

I've got a a bullet with speed of 2400 pps and when it's hitting the target sometimes it does what it's supposed to do, and sometimes it's just skipping the target! I tried to boost up the Collision Polygon of the target and bullet but still the same! Any idea around how to solve it?


Thanks a lot. fawdda2014-01-16 00:57:24
B
13
S
4
G
4
Posts: 42
Reputation: 3,967

Post » Thu Jan 16, 2014 4:07 am

The bullet is moving too fast, at those speeds the collisions will fail often for sure. Why are you using such speed?? Maybe we can find a solution to your problem.
B
10
S
4
Posts: 133
Reputation: 1,543

Post » Thu Jan 16, 2014 4:15 am

Yes, too fast. In a single tick, the bullet is moving an space greater than the size of the target, going though him. 2400 pixels per second equals 40 pixels each frame, at 60 fps
B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249

Post » Thu Jan 16, 2014 7:53 am

Also, not all platforms can do steady 60 all the time. So if frame rate halves temporarily (30fps) the bullet movement is 120 pixels per one frame and it's highly unlikely all your intended target objects are that thick.

Need help? Upload .capx file with your question.
B
16
S
4
G
2
Posts: 233
Reputation: 2,560

Post » Thu Jan 16, 2014 10:31 am

@lmchucho @lmchucho @Joannak Thank you a lot.
About the bullet speed I'm trying to give the illusion of a real bullet moving in the air so less than 2400 pps it will looks like BB Gun shot!
B
13
S
4
G
4
Posts: 42
Reputation: 3,967

Post » Thu Jan 16, 2014 11:52 am

One idea - create an invisible sprite long and thin - spawn this at your gun and check for hitting your nearest target. destroy bullet sprite as required. ?

August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,882

Post » Thu Jan 16, 2014 1:44 pm

[QUOTE=RamPackWobble] One idea - create an invisible sprite long and thin - spawn this at your gun and check for hitting your nearest target. destroy bullet sprite as required. ?

[/QUOTE]

It's the same since the alternative object should move in the same speed of the bullet.
B
13
S
4
G
4
Posts: 42
Reputation: 3,967

Post » Thu Jan 16, 2014 3:42 pm

Well if you want to be realistic, dont spawn a bullet. You cant see a bullet flying in real life so why would you in the game. Make an invisible laser for your carachter and:

If "laser" is overlaping(Enemy)
and Key(shoot) is pressed.
     > Destroy enemy.

This way you can simulate high speed with pixel perfect collisions.
B
10
S
4
Posts: 133
Reputation: 1,543

Post » Thu Jan 16, 2014 3:51 pm

[QUOTE=lmchucho] Well if you want to be realistic, dont spawn a bullet. You cant see a bullet flying in real life so why would you in the game. Make an invisible laser for your carachter and:

If "laser" is overlaping(Enemy)
and Key(shoot) is pressed.
     > Destroy enemy.

This way you can simulate high speed with pixel perfect collisions.[/QUOTE]

I didn't say I want to be realistic! I want to give the the player the illusion of bullet velocity. Anyway don't expect players to understand the frame rate technical crap.

B
13
S
4
G
4
Posts: 42
Reputation: 3,967

Post » Thu Jan 16, 2014 4:01 pm



[/QUOTE]

It's the same since the alternative object should move in the same speed of the bullet.[/QUOTE]


"space" fires bullet at 2400 (if the target registers a hit it flashes)
"F" fires bullet at 2400 (if the target registers a hit it flashes)

Sorry - did I just type the same thing twice....?

fast bullet test
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,882

Next

Return to How do I....?

Who is online

Users browsing this forum: Kin, mikehive, ratboy3, tinhofiel and 41 guests