Problem with ball-sprite physics

Get help using Construct 2

Post » Fri Mar 14, 2014 6:06 pm

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!
You do not have the required permissions to view the files attached to this post.
B
8
S
2
G
1
Posts: 14
Reputation: 644

Post » Sat Mar 15, 2014 4:22 pm

Still needing help!

Or is it impossible to control ball object with physics when the player has physics too?
B
8
S
2
G
1
Posts: 14
Reputation: 644

Post » Sat Mar 15, 2014 4:56 pm

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:
[url]
[r164] https://dl.dropboxusercontent.com/u/533 ... mphys.capx[/url]
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Sat Mar 15, 2014 4:58 pm

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
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Sat Mar 15, 2014 7:13 pm

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! :)
B
8
S
2
G
1
Posts: 14
Reputation: 644


Return to How do I....?

Who is online

Users browsing this forum: DolyGamesCosmos and 28 guests