Skip to main content
Participating Frequently
April 29, 2014
Question

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

  • April 29, 2014
  • 5 replies
  • 399 views

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

This topic is closed to new replies. Start a new post to keep the conversation going.

5 replies

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.

MoynzyAuthor
Participating Frequently
April 30, 2014

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