0 Favourites

Physics platform object stubs his toe

  • Okay, someone please explain this one to me...because I'm one confused puppy.

    I'm trying to set up a platform game using the Physics behavior to move the character around. I've created two instances of a long, flat surface, and they both rest on the same Y-axis value, maybe overlapping by a couple of pixels at their ends. Pending refinement to the movement mechanics, the character object is moving just fine.

    It's properties are set to:

    • Immoveable: No
    • Uses collision polygon
    • Prevent rotation: Yes
    • Density = 1
    • Friction = 0.5
    • Elasticity = 0
    • Linear damping = 0.6
    • Angular damping = 0
    • Bullet: No

    For the platform:

    • Immovable: Yes
    • Uses collision polygon
    • Prevent rotation: Yes
    • Density: 1
    • Friction: 0.75
    • Elasticity: 0
    • Linear damping: 0.6
    • Angular damping: 0
    • Bullet: No

    When moving left or right, I use the event Apply physics force +/- 20 at image point 0, with the image point being right in the middle of the sprite object.

    That's all the relevant stuff, I believe. So, with no rotations going on, the two instances of the platform being on the same Y-axis point, why is there a collision stopping my character from moving when it reaches the beginning edge of the second instance? It should be a continuous flat surface, right? But clearly it's catching on the corner/side of the second instance and unable to move forward.

    Anyone have any input, please? Thank you!

  • Mess a bit with the collision boxes of your object , I guess that should solve the problem ...

    Or maybe give it a Y impulse when you know ...

    or is it ... the rotate angle that obstructs it ?

  • Whiteclaws - I'll double-check the collision boxes, but since I did the click-Ctrl-drag-to-copy shortcut on the Layout, it should be the same dimensions for the box. The only thing I can think might be the case is the minute difference in the Y-axis positions for each instance...like, an extra fraction not accounted for in the Properties bar when the platform is highlighted.

    And I don't see how the rotate angle could be the case since I have them all set to Off. All my images are drawn as basic rectangle shapes, so no rotation was present at their conception.

    Now to check those collision boxes...

  • Whiteclaws - I think I discovered my problem. It's not the platforms or collision boxes at all. It's something to do with the initial starting coordinates of my character. I have some text values on the screen for me to track, and I notice that a simple JUMP results in a slightly different Y-axis value for the character's Y-axis position after it lands. After that, I'm able to move freely on the surface as if it was one super-long platform.

    Thank you for your replies and suggestions, too! Always good to be thorough and check even the unlikely possibilities.

  • yep , I got the same , it's a 1 pixel-hover that appears after jumping , I thought that was fixed ? Ashley ?

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Whiteclaws - Ah, okay. Yeah, when I started it up, I noticed the Y-axis coordinates adjusted ever so slightly, as if my character was falling simply because I supposedly placed him just a few pixels above the platform, and gravity was taking affect. However, I didn't ever actually SEE my character falling in the slightest. I thought maybe it was because I placed him slight overlapping the platform, but I doubt that was the case as I tend to be rather precise when possible...that, and I don't think my character would have been able to MOVE in the first place.

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