Rotation quiver and uncontrolled rotation.

zincotroidzincotroid Member Posts: 6
edited November -1 in Working with GS (Mac)
I have a group of actors fixed at the bottom of the screen that rotate to follow a target actor using constrained game attributes to track it's X and Y. The target actor is controlled by the accelerometer, but the problem happens in the preview using keys as well.

It seems that when the target gets directly above one of the rotating actors it quivers. Like it can't decide which side of 90 degrees it needs to be on.

Another problem which seems to be related(?). if I allow the target to come to rest at the top of the screen the rotating actors at the bottom begin to spin until I move. Then it has to rotate until it's facing the target and it begins to follow again.

Any Ideas?

Comments

  • rebumprebump Member Posts: 1,058
    Play around with "floor()" and "ceil()" to clean up the rotation angle on the quivering actor.
  • zincotroidzincotroid Member Posts: 6
    Hey rebump,

    Thanks for the suggestion, could you give me an example of how I would do that?
  • rebumprebump Member Posts: 1,058
    Well, basically in the behavior that is adjusting the rotation of the actors doing the tracking, just wrap a "floor()" around the expression that is already there. That may clean up the value enough to be keep it from shifting a little. It worked for me in one instance I used it in. If the item that is jittery has been manually placed in the scene, edit the instance (not its prototype) and make sure its X/Y position on are an exact pixel instead of a "partial" pixel (i.e. if at X=22.4 and Y=25.2 change them to X=22 and Y=25).

    There was another instance where it didn't. For that, I stumbled onto a fix: I deleted the jittery actor and copied one of the other actors over to recreate the jittery actor and it solved it. So it may be some sort of bug too.

    Ahhhh, the fun of GS beta! :-)
  • zincotroidzincotroid Member Posts: 6
    Thanks Rebump,

    I've had to be away from the game for a while, but now that I'm back I'll give this a try!
Sign In or Register to comment.