How do I stop bullet from going through the ground

Get help using Construct 2

Post » Thu May 08, 2014 3:20 am

So I have tried allowing the bullet bounce to be on, as well as a bunch of other things, but my bullet still falls through the ground when it either stops or is going very fast.

The point of the game is to swipe across the cactus it turns his bullet on, and will launch him through the air. when he hits the ground, i set his angle to self.angle * -1, essentially making him bounce. He has a ground sprite that follows his x position at all times so he will always hit it, but sometimes if you swipe hard enough, and he's going fast enough, he hits the ground, and flies downward and back instead of bouncing back up. Ground is set on event 9, and bounce is checked on event 10.


https://www.dropbox.com/s/o14r5wfn2493s7q/cactus.capx
B
35
S
5
Posts: 411
Reputation: 3,406

Post » Thu May 08, 2014 5:54 am

If the bullet is going to fast it could be hitting the wall before the hit detection kicks in. Can't check the capx right now as I am going to bed but usually you need to balance your speed with your frame rate. If you are going faster than the frame rate can keep up with you will get clipping and items that end up inside or through each other because they collide between frames.
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,603

Post » Thu May 08, 2014 11:40 am

thanks bluephaze, I'm getting good fps though, and it still doesn't make sense that, when flying right, and hitting the ground the object would bounce backwards and down. This happens when i give the object a square or a circular collision mask
B
35
S
5
Posts: 411
Reputation: 3,406

Post » Thu May 08, 2014 6:48 pm

Look at the collision polygon for your sprites and see if any of them are oddly shaped.
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,603

Post » Fri May 09, 2014 12:33 am

they are all perfect sphere. I did this by making a size 64 circle with the paint brush, put it in the center of the image, then made it guess polygon shape, then applied that polygon to the whole animation
B
35
S
5
Posts: 411
Reputation: 3,406


Return to How do I....?

Who is online

Users browsing this forum: AkbarAsgharMG, matriax and 21 guests