Skip to main content
Participating Frequently
April 29, 2014
Pregunta

Trying to scroll world in my platform game - breaks the hitTestPoint code

  • April 29, 2014
  • 5 respuestas
  • 400 visualizaciones

Hello As3 wizards

I'm making a game and my current code muddles up my collision.

        container = new Sprite();

        addChild
(container);

        container
.addChild(ground);

        container
.addChild(character);

        container.x = -character.x + stage.stageWidth / 2;


Visual imagery

Este tema ha sido cerrado para respuestas.

5 respuestas

kglad
Community Expert
Community Expert
April 30, 2014

if your hittest is done correctly (ie, checking a hit between ground and character) there shouldn't be a problem because of changes to their parent's (container) x property.

MoynzyAutor
Participating Frequently
April 30, 2014

HitTest has been done properly, because with out the scroll, hitTest works fine