Actor movable + rotation...

sebmacflysebmacfly Member Posts: 1,018
edited November -1 in Working with GS (Mac)
Hi there...

I nedd to have a rotating actor, but not moving.
Exemple : If another actor hit this rotating actor, i don't want it to move but keep rotating...

how can i do that please?

thanks

PS : In the actor attributes, if i unselect 'movable" it will not rotate :S

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    you can uncheck moveable and have a rule when self rotation=0 interpolate self rotation to 360

    that will keep a constant rotation on it without it moving
  • sebmacflysebmacfly Member Posts: 1,018
    JohnPapiomitis said:
    you can uncheck moveable and have a rule when self rotation=0 interpolate self rotation to 360

    that will keep a constant rotation on it without it moving

    Cool thanks...
    But how to change the rotating speed? (needed)

    Some actors don't have a constant rotating, but will rotate only if another actor will collide with it...
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    make a game attribute and use that as your duration. Then change that attirbute when you want to increase or decrease speed.

    For the actors you only want to rotate after a collosion, make a self attribute called rotateOn and set it to 0. Then have the same rules i put in my first post (when rotation=0 interpolate self rotation to 360) in a rule when rotateOn =1. Then have a rule when actor collides with whatevr you want ( if its different actors you want to trigger that same rotation , add them all by pressing the plus sign in that one rule so they all stay in that one rule and change your conditions from all to any)

    then have a change attribute behavior in there changeing attribute rotateOn to 1
  • sebmacflysebmacfly Member Posts: 1,018
    O (actor 1)

    =====+===== (actor 2)
    Axis

    If the actor 1 hit the actor 2 to the left (falling), the actor 2 have to rotate and rotate speed depend on actor 1 speed... (actor 2 rotate on + axis)

    Your tips is great but i don't think that you can apply the actor1 speed on actor2... ?

    Thanks man
  • sebmacflysebmacfly Member Posts: 1,018
    Ok, John, the best way in my game is to contrain the rotating actor to the X and Y self.position.
    In that case i can make it movable. I use density = 10.000.000.000 (big) in the rotating actor attributes.
    I use rotate instead of interpolate because of the strange bounce with interpolate (other actors are not rebounding correctly on it, pasting on the rotating actor like a glue...). with rotate, good rebound.

    Thank you anyway!
    Cheers
Sign In or Register to comment.