Constraints movement update speed very different based on layer order
JonTiStudios
Member Posts: 66
I've been out of the GS loop for a while and just recently started up again. I was testing a simple game today and game across what I assume must be a bug.
I wanted to constrain an image to my main character. I created a global attribute for X and Y, had the global attributes constrained to the main actor's X & Y. Then I constrained the 2nd image to the global variables (still the best way to do this I assume?)
When the 2nd image is layered in front it work fine. However, the image needed to be layered behind the main character and when I made this change suddenly the constrained 2nd actor is lagging behind in movement.
Here's a zip file with a quick example: http://dl.dropbox.com/u/14883954/ConstraintsIssue.zip
The red boxes are constrained to the global attributes, the blue boxes are setting the attributes. The boxes on the left have the red box in front of the blue, where the boxes on the right of the screen have the red box behind the blue. Press Up and Down arrows and you'll see the difference. Same constraint rules are applied to them.
Am I missing something obvious here? This seems to me to be a bug since a simple layer re-order fixes it.
I wanted to constrain an image to my main character. I created a global attribute for X and Y, had the global attributes constrained to the main actor's X & Y. Then I constrained the 2nd image to the global variables (still the best way to do this I assume?)
When the 2nd image is layered in front it work fine. However, the image needed to be layered behind the main character and when I made this change suddenly the constrained 2nd actor is lagging behind in movement.
Here's a zip file with a quick example: http://dl.dropbox.com/u/14883954/ConstraintsIssue.zip
The red boxes are constrained to the global attributes, the blue boxes are setting the attributes. The boxes on the left have the red box in front of the blue, where the boxes on the right of the screen have the red box behind the blue. Press Up and Down arrows and you'll see the difference. Same constraint rules are applied to them.
Am I missing something obvious here? This seems to me to be a bug since a simple layer re-order fixes it.
Comments
The answer you've already discovered is to re arrange the layers.
This is because GS loads the actors in the scene from the bottom up to if an actor at the bottom relies on some rule in an actor above it, the affected actor loads before the rule and do doesn't work as intended, if the other way round the rule loads first and all is well.
This is going on my experience, and what I think is happening.
Battleduck