Rule for moving actors (universal build)
RedRobo
Member, PRO Posts: 682
I have a rule for moving actors position which are close to the edge of the screen so that depending on screen size they will fit into the frame (for a universal build).
This works great for actors near the edge of the screen. What I would like though is for the amount the actor moves to decrease the closer the actor is to the center of the current device screen. at the moment depending on whether they are above or below the center line they will move the exact amount either upwards or downwards. Is there away to have the transform amount taper off as it is closer to the center. This is for a landscape build.
Does this make sense to anyone???
Comments
Anyone?
Here is an example that might help:
@RThurman Ha ha...wow...what you've done is totally cool and really clever
Trouble is I didn't explain myself very well and it's not quite what I need ;/ sorry....
My actors are static and not moving but need to be positioned at the beginning of the game so they don't appear off screen for a universal build (using overscan).
I would like the actors near the edge of the screen to always be on the edge of the screen, whether an ipad or iphone and I would like this amount of transform to taper off proportionately for actors that are closer to screen center.
Make any sense???
I think this is what your looking for.
http://forums.gamesalad.com/discussion/86157/my-universal-binary-overscan-secret-weapon/p1
Change the position (for example Y) to:
[half screen height]-(([half screen height]- self.Position.Y )*[reduction/enlargement])
@BBEnk Thanks for the link. This is the actual technique I'm using at the moment. It works great for adding the exact amount of units that are cut of from a particular device. It's great for actors on the edge of the screen but if an actor was a quarter the way up a screen it would still apply the same amount of transform which is sometimes too much.
@Socks Thanks for the idea. Can't get this to work exactly as I wish but I think I need to have a re-think and solve this some other way...
I think I have a similar question. I am trying to create an into screen with 4 slides you have to swipe through before starting game. I have the swiping logic put in and have build a long horizontal actor with 4 slides attached one after another. The issue is when I swipe left, the actor moves over to the second slide but remains stuck on that and does not go forward to backward. Can anyone help? @BBEnk @Socks @RThurman
Supplied code information: "I have the swiping logic"
Imagine this were a maths question, it might look like this:
I am trying to create a sum that adds up to a certain value. I have the calculation set up on my calculator. The issue is when hit the '='/enter button I get the wrong result. Can anyone help?
Would you be able to work out what is wrong with the calculation ?