Problem with ball-sprite physics

0 favourites
  • 5 posts
From the Asset Store
Everything is made via physics, Very simple code: 6 events only (3 for tank creation, 2 for controls and 1 for camera)
  • Hi!

    I am new with Construct 2, and currently am developing a concept of a ball-throwing game of sorts. There are two problems: when the ball bounces from the head of the player, the bounce is unreasonably strong. This happens when the player is in motion (moving or jumping). The second problem is that when the ball is between a player and a wall, it creates an enormous bounce. This happens when the player is right beside the wall and the ball is kind of "stuck" in between them. I have wrestled with this problem for a few days now and don't know how to proceed.

    Can you please help me with this? I have attached the .capx file to this message. I'm new in these forums, but I already have noticed that the Scirra community is very helpful and awesome!

    Thanks in advance!

  • Still needing help!

    Or is it impossible to control ball object with physics when the player has physics too?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • combining physics and other movement behaviours at the same time will almost always cause messiness because the two behaviours will be clashing as to where to position the object each tick

    two options

    you could delete platform behaviour and attempt to recreate the same movement with the physics actions.. this is difficult to fine tune and would require collision detection for being able to jump off the ground etc

    or, you could delete the physics behaviour from the platformer, and instead have an invisible physics object the same size that follows the player, purely for colliding with other physics objects. This is good if you want to keep the traditional platformer style movement, the downside is that the player doesn't move when getting hit by other objects.. although that might be preferred.

    I had to try method 2 if it worked okay:

    [r164] https://dl.dropboxusercontent.com/u/533 ... mphys.capx

  • one other thing, instead of replacing a carriable physics object with a non-physics version of the same object, you can just disable and enable the physics behaviour when it is picked up and thrown

  • Thanks keepee! The second method worked better than I expected, but it needs a bit adjusting. (Don't know myself yet what kind of adjusting..) I have thought about a local two-player game (the palyers share the keyboard) where you can poke the opponent and throw the ball, and I thought that I needed the physics for the player for the poking. But I'll try to create the collisions with platform vectors.

    Thank you and and if you have suggestions for improving the method, feel free to share!

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