Anyone had platform issues when moving hotspot pos

This forum is currently in read-only mode.
From the Asset Store
A pack of 76 platform designs for a platformer game with a mushroom/jungle theme
  • I have a character in my project with the platform behavior,

    and it's collision detection is set to 'pixel'.

    However in the project, for some unexplainable reason,

    when I move the hotspot position of the character in the frames

    of an animation same new hotspot position for every frame)

    it just floats off to the right for absolutely no logical reason?

    It can't be my script because I can spawn the character

    anywhere in the air beforehand and it works, but if I'm

    not moving the character on the ground or in other circumstances,

    it just starts floating off to the right and flipping through

    walls it should collide with?

    Has anyone experienced anything like this before, is there any solution?

  • Might check the collision mask.

  • The collision mask isn't something that can cause floating when on the ground or in the air for absolutely no recognizable reason.

    I've also never touched the collision mask, and the settings are set

    to 'pixel' collision.

  • It can if you are changing frames while standing, and difference from the hotspot to the bottom of the collision mask are different each frame.

    Basically One frame may push the object up, and another may push it sideways, etc.

  • Nope, as I mentioned the hotspot has been moved to the same position through every frame.

    Also if he spawns in the air he should fall down, but if I spawn him int he air after the change (where a difference in the hotspot shouldn't

    make that large a difference at all) he starts floating off to the right.

  • After some more testing, it seems as though the character floats off in the opposite direction to the location I move the hotspot o_O?

    So I move the hotspot down, it floats up. Move it up, it floats down.

    Left/right, right/left.

    Any idea how/why this is occurring?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Posting the cap file would help.It's difficult to solve the problem without seeing what the actual problem is.

  • Well I finally isolated the issue @;

    So I made a simplified demo file to show what's happening.

    http://ifile.it/lkb3in9

    Incase you don't have it, this project requires the following plugin -

    advanced camera plugin

    (It was the only way I could get it to follow the object, the 'center view on me' wasn't working?)

    It seems as though when gravity is added, it works perfectly fine and

    you can have the custom collisions.

    (note: This is in the case of when you've also got platform behavior)

    However, as soon move the hotspot, even though the gravity is set to off, it kicks in and also ignores the collision and flies through

    the objects.

    In the example I've currently left the hotspot in the middle so you

    can see how works perfectly fine until you change the hotspots position.

  • It's not the hotspots, Physics+Platform behavior don't mix well.Disable the physics behavior.

  • Well like I said, it works absolutely perfectly until you change the hotspot position.

    So is there any way to be able to get custom collisions with platform

    behavior without physics?

  • Create a separate sprite to use as a collision box. Set the platform behaviour to that sprite, and then have your animated character sprite positioned to the collision sprite.

    Also, why do you need to change the hotspot position?

    The platform behaviour will collide with anything that has the atribute "solid".

  • The reason I need to change the hotspot is because of the big issue,

    of when the character rotates near corners, he ends up getting thrown

    through the wall because of the location where the object rotates

    (you can't set a specific rotation angle when having him rotate from

    an offset position/point).

    Which is a really frustrating occurrence.

    I was thinking of the collision box, but it would be a nightmareish

    amount of recoding to get everything changed over to that box,

    just for the slight possibility it might stop the shooting through

    walls occurring.

    It also seems like, when I set the character to a specific angle,

    and it get's thrown through the side of the wall, it seems like

    it doesn't actually skip angles.

    The only logical reason it would end up getting thrown through the wall,

    is that it's rotated instantly to the new angle, and when the character

    is rotated halfway through the wall it pops out the other side.

  • Physics behavior should be fine with platform if you set the physics behavior to immovable. Also physics behavior has a problem with uncentered hotspots, so that could be part of the issue

  • Well if physics didn't like un-centered hotspots, that would be the most

    likely issue.

    Guess I have to just give up on custom collision as a solution to my

    problems.

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