Problem when colliding with a "custom" rotating actor. Maybe a bug?

MarkOnTheIronMarkOnTheIron Member Posts: 1,447
edited November -1 in Working with GS (Mac)
I was working on an update for my last game "A Plinky Game!". In one of the levels I made an actor rotate from one end using rules and change behaviors but I got strange to none collision.

It's something wrong with my code or it's a bug? Here's what I did:

The scene has gravity.

On the rotating actor:

Movable set to false
An animate attribute with 4 frames

- Timer
Every 1 second
Change attribute self.myPosition to (self.myPosition+1)%6 <-- That's to get a value between 0 and 5

- Rule
When attribute self.myPosition = 0
Change attribute self.PositionX to 25
Change attribute self.PositionY to 240
Change attribute self.Rotation to 120

- Rule
When attribute self.myPosition = 1
Change attribute self.PositionX to 55
Change attribute self.PositionY to 240
Change attribute self.Rotation to 60

And so on until self.myPosition = 5 and after that the value get back to 0.

On the colliding actor (the ball):
- Rule
When overlap or collide with actor of type Laser
Change attribute self.iamDead to 1

- Rule
When attribute self.iamDead = 1
Destroy this actor

What happens is that with those rules everything apparently works fine and the actor rotate exactly as I meant it to be, however the ball collide only with the invisible "ghost" of the rotating actor that stay fixed on the coordinates relative of the 0 value of myPosition.

I tried to change the rotating actor to movable and using constraint attribute instead of change attribute to avoid it to fall but it seems that the ball collide with a falling invisible "ghost" of the rotating actor.

I don't know if I explained the problem well and I can't post an example now since I'm at work, but if someone has an idea of what is happening his help is welcome.

Comments

  • MarkOnTheIronMarkOnTheIron Member Posts: 1,447
    No one?

    Sorry the hurry, but if it's not doable I have to redesign some levels.
  • MarkOnTheIronMarkOnTheIron Member Posts: 1,447
  • 8x8n88x8n8 Member Posts: 80
    Yeah man, it's GS. It really doesn't have the best collision detection with rotating actors. I know that in Kill the King they had rotating pinwheel shaped actors interacting with circular actors. If you looked at their code there could be your answer.
  • MarkOnTheIronMarkOnTheIron Member Posts: 1,447
    I also have a rotating saw that works well even with gravity and collide with no problems.

    The problem here is that since GS doesn't allow for end point rotation the only other solution would be to use an actor that is half invisible but it still would collide with the invisible part.
  • synthesissynthesis Member Posts: 1,693
    Ask "Eastbound" directly...he did Kill the King...he may be familiar with the issue.

    Your problem sounds too in depth for most of us to jump in and quick fix without getting directly involved in your game...it may be one of those things you just have to work through on your own. We all have them. Some problems I have come across can take a whole day to resolve...but I eventually solve them. Don't give up...just look for an alternative to achieve the same results. Simpler is always better.

    One thing you might try is isolating rules:
    Maybe this thread will help:
    http://gamesalad.com/forums/topic.php?id=3913#post-22935
  • MarkOnTheIronMarkOnTheIron Member Posts: 1,447
    I already was able to replicate Kill the king rotating behaviors since they involve actors rotating at midpoint.

    I was trying to replicate with rules an end point rotation (using transparent pixel for the other half would be pointless since it would still collide).

    I think this is for sure a bug since I read in another thread another user having similar problems when trying to create a pinball game. I sent a working copy of the issue to GS to see if they can address it in future updates.
  • MarkOnTheIronMarkOnTheIron Member Posts: 1,447
    Just a bump.

    Maybe someone has some idea on how can I overcome this problem.
Sign In or Register to comment.