Rotation without moving because of collision.

SnapFireSnapFire Member Posts: 361
edited November -1 in Working with GS (Mac)
Hey everyone,

In my game, I need to have a bar rotate on command, and things to bounce off it. I've tried multiple different things including changing the self.rotation of the actor to self.rotation+1 or -1, every 0 seconds, but this looks jittery and cannot go fast. I want to use rotation, but when I do, the bar slides away from the ball that hit it. I want it to stay centered in one place, but be able to rotate on command using the rotate behavior. I have movible checked (I have to for the rotate) and fixed rotation unchecked. I have looked and looked, but can't seem to find a solution.

Help is appreciated
-Thomas

Comments

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    Try setting the density of the bar to something extremely high (in comparison to the density of the bouncing thingys).
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    constrain the x and y to a specific place
  • SnapFireSnapFire Member Posts: 361
    Tried both of those. No luck :(

    Any other ideas?
    -Thomas
  • POMPOM Member Posts: 2,599
    I can't see why it will not work ..

    Check movable.
    Uncheck fixed rotation.
    Constrain x and y to your pivot point .
    And use rotation in your command .

    It should work unless we miss some info about whats going on..

    Roy.
  • SnapFireSnapFire Member Posts: 361
    P-O-M said:
    I can't see why it will not work ..

    Check movable.
    Uncheck fixed rotation.
    Constrain x and y to your pivot point .
    And use rotation in your command .

    It should work unless we miss some info about whats going on..

    Roy.

    I agree with you. However, I'm completely sure I've given all the relevant info. Maybe a bug?

    One more thing. The things hitting it are moving because of gravity. The thing won't even turn. I looked at this for 90 minutes today without any luck. It just doesn't make sense. It'll probably be another one of those things that, when I figure it out, I'll be like "Oh yeah..... I'm stupid"

    Anyway, thanks for any help
    -Thomas
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    SnapFire said:
    One more thing. The things hitting it are moving because of gravity. The thing won't even turn.
    OK -- objects with high gravity can dramatically affect the bar's movement. Have you tried it without gravity (just to see if things get knocked about if there is no gravity.) That way you will know what the issue is.
  • SnapFireSnapFire Member Posts: 361
    RThurman said:
    OK -- objects with high gravity can dramatically affect the bar's movement. Have you tried it without gravity (just to see if things get knocked about if there is no gravity.) That way you will know what the issue is.

    I can't get the thing to turn now. ???

    When I do get it to move, I'll try that.
  • HappyKat78HappyKat78 Member, BASIC Posts: 173
    I had the exact same issue and found this thread. P-O-M's suggestion works. I don't use gravity, instead I use acceleration down to create a gravity effect and by locking the X and Y position and having the rotating actor with a much higher density it seems to stay in place. I noticed it does make a tiny difference to the rotation speed upon collision but not noticeable to the human eye. :-)
  • CloudsClouds Member Posts: 1,599
    . . . . or just constrain self.rotation to self.Time *1000 (or whatever speed you want).
  • SnapFireSnapFire Member Posts: 361
    Oh hi guys, I never even came back to this thread to thank RTM! I feel guilty now.
    My app, Marble Mania Free, came out 2 months ago. I used everything he told me and it ended up working great.
    -Thomas
Sign In or Register to comment.