Multiple Collision Help

SinequanonSinequanon Member Posts: 35
edited November -1 in Working with GS (Mac)
So this is a peculiar problem.

I have a calculated speed for an actor that's saved as a game attribute - game.Speed.

When that actor collides with my second actor, I want to add the game.Speed attribute to the second actor's Angular Velocity attribute. To give an example I want:

Collision 1: game.speed = 50, angular velocity = 0 results in final Angular Velocity of 50.
Collision 2: game.speed = 50, angular velocity = 50 results in final Angular Velocity of 100.

Currently the second collision isn't being registered. I have tried a few different methods:

I have a boolean attribute on actor 2 called collide. I tried setting up in the rule:

When actor overlaps or collides with actor 1, & collide is false
Change attribute: self.collide to true

Change attribute: self.motion.angular velocity to self.motion.angular velocity + abs(game.speed)

After .25 seconds, change attribute: self.collide to false

Also, I tried 2 different rules:

Rule 1: When actor overlaps or collides with actor2,

Change attribute: self.collide to true
Otherwise
change attribute: self.collide to false

Rule 2: when self.collide is true

Change attribute: self.motion.angular velocity to self.motion.angular velocity + abs(game.speed)

In either case, it's only registering a collision once, ever. What gives?

Comments

  • SinequanonSinequanon Member Posts: 35
    Thanks for the video, but not quite the problem I'm having.

    I'm not changing scenes, I'm trying to register more than one collision when two actors overlap. The analogy would be if you had a big, fixed wheel in the center of your project and you used the mouse cursor to collide with the wheel as though you were swiping it, and each time you did, the speed (calculated using magnitude(lin.velocity.x, lin.velocity.y) of the mouse) of the mouse was added to the wheel as angular velocity. It works once but it does not work in an additive manner (nor does it register a second collision at all).
Sign In or Register to comment.