Actor Not Appearing Where Collision Box Is

ShinKaigan

  • Posts: 10
I am completely baffled at this new issue I ran into. I am creating a card game where an Actor (the card) spawns at a given location on screen and is anchored to it. After I use the card, the Actor is then killed. The issue occurs when I try to spawn another copy of the same card after the screen has moved. The visual of the card appears at its old location, however everything else about the card (collision box, clickable area, etc) is where it is supposed to be.

I strongly suspect that this has to do with recycled actors, because if I kill two cards, the next two cards are bugged like this but the third card is perfectly fine. I have tried every which way to solve this but I couldn't figure it out. Attached below is a demonstration of the bug.

Image 1: I had drawn three cards.

Image 2: After using a "Bash" card, the actor is killed. Then I put the command to draw another card and instead of appearing where it should on screen it looks like this.

Image 3: Future cards appear where they should. Additionally the bugged actor still behaves as if its still there. You can see it in the empty slot, it has collision preventing the most recent card from sliding over. Additionally if I click on the blank square where the card should be, it still triggers any behaviors/events the card has.

rob1221

  • *
  • Posts: 9473
Recycled actors have multiple bugs in 2.2 and I don't recommend using them.

ShinKaigan

  • Posts: 10
I should probably note that this is stencyl 3.0 and I don't have the option to not recycle the actor. :(

rob1221

  • *
  • Posts: 9473
In that case I suspect the problem is relating to anchoring, which is bugged in 3.0.

Legendary Hoamaru

  • *
  • Posts: 1088
Fixed.  Anchored actors should be good now for both physics modes.  Let me know if any other issues exist.

Jon

  • *
  • Posts: 17524
SK, can you confirm that this is fixed?