Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: leafy on March 24, 2011, 10:50:53 pm
-
What I have problems with is not creating the platform but getting the player to detect the platform and move with it. Pixel-detection can detect, but not cause the player to move with the platform.
The best way I can come up with is to use a combination of pixel testing and looping through all the objects to move the player, but is there a better way?
-
Uh, instead of looping through all the objects, maybe check all of the objects touching the player instead?
-
You have to loop through all the objects to see which ones are touching the player :P
-
Wouldn't you have to loop through all the objects to perform movement operations on the moving platforms anyways? Maybe implement a player check within this.
-
That still doesn't move the player along with it, though...
Maybe store the movement of the object in a temporary variable, then just before moving the object check if the object's close enough to the player, and if so add its movement to that of the player as well?