When this actor hits an actor

Masked

  • Posts: 76
The description for this block says "Returns true if the other actor was terrain" and the "When this actor hits terrain" block description says "Missing", for me at least.

Ceric

  • *
  • Posts: 610
Same here. I'm using the most recent preview of b368.

Greg

  • *
  • Posts: 1260
Yikes, not sure how that happened but I will fix it for the next build.

Masked

  • Posts: 76
Is it possible the block might be flawed in general? I'm having trouble consistently detecting collisions with actors.

Greg

  • *
  • Posts: 1260
Can you create a simple test game (one scene, couple of actors, etc...) that reproduces the issue?  If possible, and you can upload to Forge - I can take a peek.

As far as I know it should be working fine. 

Masked

  • Posts: 76
Trying to keep my game under deep wraps, but would telling you that the problem happens when a projectile that kills an actor and is supposed to die upon collision with any actor help? Sometimes, it doesn't die when it kills the actor. It just bounces off. Delaying the actor's death a bit doesn't seem to help.

Unrelated-ly, I also get 2 collisions where 1 would be ideal. That's probably more a problem of physics than coding, though.

(I'll send you a copy privately if I have to, just holding off for maximum reveal potential)

Greg

  • *
  • Posts: 1260
Trying to keep my game under deep wraps, but would telling you that the problem happens when a projectile that kills an actor and is supposed to die upon collision with any actor help? Sometimes, it doesn't die when it kills the actor. It just bounces off. Delaying the actor's death a bit doesn't seem to help.

Unrelated-ly, I also get 2 collisions where 1 would be ideal. That's probably more a problem of physics than coding, though.

(I'll send you a copy privately if I have to, just holding off for maximum reveal potential)

Understood about the privacy.  I wasn't sure if it would be too much hassle just to set up a very minimal and quick test game (outside of the game you're working on now) that would do nothing except display the issue at hand. 

I just tried this using 2 actors -

- One actor to take the collision
- One projectile Actor

The scene waits for a mouse press and fires the projectile at the Actor.  The projectile Actor has a single behavior.  All it does is check for a collision, check if the other actor is an Actor, and then dies.  So far I haven't been able to reproduce the scenario where the projectile bounces off the Actor - so I feel like something else might be at play in your game.

If you want to send me the game privately so that I can take a look, I obviously promise not to share the game with anyone else, and would only use it to debug this issue.  Don't feel like you have to though - if you can find another way to reproduce. 

Masked

  • Posts: 76
Game's on Forge as "Masked's Game". I'll leave it up for the next hour or so. I'm private messaging you the controls.

Greg

  • *
  • Posts: 1260
Got it, thanks.  I'll take a look and will get back to you

Greg

  • *
  • Posts: 1260
If you get a minute can you send me a private message with the instructions on what to do when running the game, to see the issue?

Masked

  • Posts: 76
Did you get my message with the controls? I think I listed it there. I'll send how to reproduce it again anyways.

Greg

  • *
  • Posts: 1260
Got it, thanks.  Looks like the issue is that the game is spawning 2 projectiles.  One of them collides and dies, but the other bounces off.  It only looks like there's one because they must be perfectly in sync. 

I found this by putting a print statement in the "when created" of one of the projectile's behaviors.  It simply wrote "created projectile".  I found that firing once caused two to be created, and only one died on collision.

I haven't checked into the behavior that spawns them yet, but that might be enough to give you something to look into.  I'll check myself in a bit. 

edit: I might be wrong - I just got it to happen again and only one message printed this time.  Stand by...

edit 2: I noticed that the issue doesn't happen when the enemy's behavior is disabled.  Could be something going on when it's changing animations?

« Last Edit: March 23, 2011, 12:53:35 pm by Greg »

Masked

  • Posts: 76
Oh, the collision boxes could be changing. Didn't think of that. Let me see...

That doesn't seem to be it. The collision boxes are the same for all relevant animations, and I tried making everything the same collision group, but that didn't fix it. I'm looking into your multiple bullet theory.

« Last Edit: March 23, 2011, 01:08:35 pm by Masked »

Greg

  • *
  • Posts: 1260
I'm beginning to think the multiple bullet thing is not it.  I have to drive home from work now but I will take a look at this tonight. 

Masked

  • Posts: 76
I'm beginning to think the multiple bullet thing is not it.  I have to drive home from work now but I will take a look at this tonight.

All right. Thanks a lot.

*Edit* It's definitely the animations. I made it so that the hurt and death animations were the same as the idle animations, and it fixed the ricochet and sticking knives, I believe. Looking into this more..

*Double Edit* Just realized that in the version I sent you I'd put a kill on collision block into the Knife Properties behavior that shouldn't be there. It's at the end of the on collision part, you can just drag it out. Not sure if that will change anything.

« Last Edit: March 23, 2011, 01:22:42 pm by Masked »