How do I make sure that there's no response for collisions with solids?

0 favourites
  • 4 posts
From the Asset Store
Particles support animations, collisions, effects and etc.
  • So, in my game there's a concept similar to browser T-Rex, but the charachter is trapped in a box in the left about 40% of the screen, so he can't get to the right side. But it's made likely poorly, with just a box of invisible textures that have property "solid object", which works fine except for the part where charachter creates a little disturbance on colliding with those walls, kind of like a screen shake, which I would like not to happen. Is there any way to avoid this?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Normally that doesn't happen if everything is set up properly. Also, the invisible box isn't a bad idea, a lot of games use that same technique.

    Can you check and make sure that the collision polygon for your character is the same for each frame? If your character has an animation playing but the collision polygon changes during the animation, the character won't stay still when touching the wall.

    To fix this, simply pick the smallest (lowest width/height) frame, and set the collision polygon of each frame to that of the smallest one.

    If your character doesn’t have an animation, the issue might stem from a different problem. In that case a project file would be useful.

  • Yeah, the problem was, in fact, with hitboxes, they were a little different since I've imported them instead of making points myself. Not sure why the game created this weird effect of screenshake though, but thx for the advice.

  • When the sprite is in direct contact with the wall and the collision polygon changes, the polygon itself may overlap with the wall. When this happens, the engine assumes that the sprite is passing through the wall and instantly pushes it out. Shortly after, however, the collision polygon changes again, and the cycle repeats. Each time this occurs, the sprite's position shifts abruptly, and if the camera follows the exact position of the sprite, it results in a screenshake effect that you see.

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