0 Favourites

Problem with ball-sprite physics

  • 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?

  • 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

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • 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)
Similar Topics Posts Views Last Post
Unread hot topic
1,941 263,379
FlyingRam's avatar
FlyingRam
Unread hot topic
0 Favourites
[BEHAVIOR] Chipmunk Physics
673 82,533
nelostic's avatar
nelostic
Unread hot topic
0 Favourites
[BEHAVIOR] Sonic Physics
126 31,181
Ostrich10164's avatar
Ostrich10164