How do I movement

0 favourites
  • 3 posts
From the Asset Store
Run and Jump in 3 Dimensions! Take your platformer to the next level!
  • how to make he can't go thro solid object i whan he move 32 pixel when press

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I'd recommend using the built-in behaviours inside of Construct 2 for this, but, if you want to do it this way you could add subevents to those events, so, for example:

    The player presses the up arrow key move the player 32 pixels up, check if it is overlaping the wall object and if it is move the player 32 pixels down.

    Here's a .capx:

    Collision

    I also altered the collision box to be a little smaller. It mustn't touch the edges of the sprite.

  • That will only work if the character and walls are at least 30 pixels wide though With a 2 pixel wall and a 10x10 pixel character it could skip right through. So you would have to considder the placement of every piece.. Here is your example but sizes are changed so it doesn't work anymore. https://dl.dropboxusercontent.com/u/1750576/gothroughwalls.capx

    So this is really up to vorpalblade if it would work in his situation or not. Perhaps otherwise show as an example of what you mean vorpal..

    Is there nothing like raytracing in construct? Anyone?

    Otherwise perhaps use lerp and have an invisible object move from the character to the destination and report any overlay with solid objects which would cancel the move.

    Not sure if this could be made practical and work but I know this would work in theory. Someone with proper Construct2 knowledge here that can give their thoughts on what I just suggested?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)