collision glitch - now a non pro discussion

RiffelRiffel Member Posts: 1,272
edited November 2012 in Working with GS (Mac)
Hi friends,

I have made this video to show my problem



here the code:
image
the big white cube (wall actor) has no code

it's a shoot'm up game, the white missiles suppose do destroy when collides with the big box, notice lots of missiles crosses the big actor

how to avoid the "tunneling" problem?

there is an method for Continuous Collision Detection (CCD)?

Thank you,
Marcos Riffel

Comments

  • RiffelRiffel Member Posts: 1,272
    Hi friends,

    I have made this video to show my problem



    it's a shoot'm up game, the white missiles suppose do destroy when collides with the big box, notice lots of missiles crosses the big actor

    how to avoid the "tunneling" problem?

    there is an method for Continuous Collision Detection (CCD)?

    Thank you,
    Marcos Riffel
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Merged these two threads for you.

    Cheers
    John
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    As I understand it, the problem is that when your speed/velocity is that high (e.g. 2000), the actors actually skip past the wall actor. I don't know if you've been able to verify that, but that's my guess... that some of the actors aren't ever landing on the wall.
  • POMPOM Member Posts: 2,599
    Clearly some of the actors are crossing too fast for the CPU to notice.
    Why not use a different rule instead
    Something like
    When "self.position.X" > 600
    Destroy

    Or simply slow down those missiles to 1000 maybe?!

    Roy.
  • famekraftsfamekrafts Member, BASIC Posts: 834
    First u have put collision detection in cannon, it needs to be in missile? Second timer is 0,3 it should be 0.3 right? And check run to completion.
  • famekraftsfamekrafts Member, BASIC Posts: 834
    You have made cannon to move while you are spawning missiles bit confusing, make sure the timer is ok and lower the speed 1000 will be good enough
  • RiffelRiffel Member Posts: 1,272
    ops, I inverted the titles! the cannon spawn missile actors
  • RiffelRiffel Member Posts: 1,272
    missile speed set to 1000
    using the x>N don't is a solution. I have more walls in the scene, now the wall actor has a sensor, notice the missile hits the second wall sometimes the third.

  • TesseractEngineTesseractEngine Member Posts: 180
    edited November 2012
    I can't say this with certainty, @Riffel, but I suspect you've simply hit a ceiling with GS performance. 2000 is just too fast for the engine to catch a discrete collision every cycle.

    You've already hit the nail on the head mentioning CCD. I'm certainly not clever enough to figure out how GS could do a priori collision detection, and I've not seen anyone else suggest a method.

    I'm guessing the LUA-free engine _might_ help when it is released. But 2000 is fast!

    Would love to know if anyone CAN figure out continuous, tho!
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    One way I've gotten around the speed issue is by making the walls much wider, if that's an option for you.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Make the density on the walls higher than the bullets.
  • adlaimadlaim Member Posts: 68
    when actor is collide change color alpha to zero
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited November 2012
    I opened a new project, added the rules you have and tested it. The bullet actors all stopped at the wall (actually, they appear to move slightly past it, but they are destroyed when they collide with it). Is it possible you adjusted some of the physics settings (such as @FryingBaconStudios mentioned) and that that is causing the problem?

    [Edit: if I let it run long enough, the bullet actors do make it through the wall sometimes, just not as often as yours in the initial video you posted. The weird thing is if I click between the preview window and the debugged window, it causes the bullets to bypass the wall at a much quicker rate...]

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited November 2012
    Here i got it to work. using a density of 10 and a friction of 10 on the wall. Remember density affects how actors overpower eachother. Link to file http://fryingbacon.com/temp/firebullets.zip

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Here's the file.
  • RiffelRiffel Member Posts: 1,272
    thank you all for helping! :-bd
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    @tatiang we need to coordinate.....LOL. *-:)
  • TesseractEngineTesseractEngine Member Posts: 180
    Great investigative work @FryingBaconStudios and @tatiang!

    Putting 'Collide with Bullet' on the wall really does seem to do the trick!
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    @FryingBaconStudios we do! :) And I gave you an awesome for your bullet vortex effect.
Sign In or Register to comment.