soccer ball phisics

Get help using Construct 2

Post » Thu Mar 09, 2017 4:03 pm

hi, I'm working on a project for a simple "football game" like the old "sensible world of soccer" or "kick off" series...
right now my main difficulty is to characterize the soccer ball phisics, specifically rebounds and high balls...
tips or suggestions on the easiest and fastest way to address the problem?
I apologize in advance for my English, it's a Google Translation :lol:
Image
sorry my bed English ^_^
B
14
S
7
G
7
Posts: 549
Reputation: 6,075

Post » Thu Mar 09, 2017 4:12 pm

What do you want the ball to do on a rebound or high ball?

You can adjust the physics behaviors in an event for a specific action if you want more elasticity etc.
Banned User
B
28
S
7
G
58
Posts: 1,229
Reputation: 34,830

Post » Thu Mar 09, 2017 4:23 pm

lamar wrote:What do you want the ball to do on a rebound or high ball?

You can adjust the physics behaviors in an event for a specific action if you want more elasticity etc.

I wish depending on the power with which is kicked, the ball flew away and did bounces realistically
sorry my bed English ^_^
B
14
S
7
G
7
Posts: 549
Reputation: 6,075

Post » Thu Mar 09, 2017 4:33 pm

OK you can set the density of the ball and elasticity of the ball and the players in physics settings and in events.

If you want more bounce set the elasticity higher and the player density higher than the ball.

You have to play with those numbers until it feels right.
Banned User
B
28
S
7
G
58
Posts: 1,229
Reputation: 34,830

Post » Thu Mar 09, 2017 5:00 pm

lamar wrote:OK you can set the density of the ball and elasticity of the ball and the players in physics settings and in events.

If you want more bounce set the elasticity higher and the player density higher than the ball.

You have to play with those numbers until it feels right.

uhm I do not think it is so simple, perhaps the only way is the "Sine" behavior?
you have to consider that there is no gravity in the game, ball and players move on a "free" layer, both with 8dir behavior, when player collide with the ball, the ball move tot with "set 8direction vector" command, for shoot i set the vector more biggest and add some max speed of the ball
sorry my bed English ^_^
B
14
S
7
G
7
Posts: 549
Reputation: 6,075

Post » Thu Mar 09, 2017 5:06 pm

NN81 wrote:
lamar wrote:OK you can set the density of the ball and elasticity of the ball and the players in physics settings and in events.

If you want more bounce set the elasticity higher and the player density higher than the ball.

You have to play with those numbers until it feels right.

uhm I do not think it is so simple, perhaps the only way is the "Sine" behavior?
you have to consider that there is no gravity in the game, ball and players move on a "free" layer, both with 8dir behavior, when player collide with the ball, the ball move tot with "set 8direction vector" command, for shoot i set the vector more biggest and add some max speed of the ball


OK then you are over riding the natural physics of the ball and player.

Gravity does not effect density and elasticity. Those still work in no gravity however you should be using impulse, force and velocity not 8 direction speed.

I use physics all the time in my games so I do know how the physics commands work.

Sine will add some motion sway to the ball as it moves but it will be predictable and not realistic physics.

Since you are playing on a flat field with no gravity you might be better off not using physics at all and set the ball to be a bullet with bounce and then you can use Sine to simulate a high kick.
Banned User
B
28
S
7
G
58
Posts: 1,229
Reputation: 34,830

Post » Thu Mar 09, 2017 5:55 pm

lamar wrote:
NN81 wrote:
lamar wrote:OK you can set the density of the ball and elasticity of the ball and the players in physics settings and in events.

If you want more bounce set the elasticity higher and the player density higher than the ball.

You have to play with those numbers until it feels right.

uhm I do not think it is so simple, perhaps the only way is the "Sine" behavior?
you have to consider that there is no gravity in the game, ball and players move on a "free" layer, both with 8dir behavior, when player collide with the ball, the ball move tot with "set 8direction vector" command, for shoot i set the vector more biggest and add some max speed of the ball


OK then you are over riding the natural physics of the ball and player.

Gravity does not effect density and elasticity. Those still work in no gravity however you should be using impulse, force and velocity not 8 direction speed.

I use physics all the time in my games so I do know how the physics commands work.

Sine will add some motion sway to the ball as it moves but it will be predictable and not realistic physics.

Since you are playing on a flat field with no gravity you might be better off not using physics at all and set the ball to be a bullet with bounce and then you can use Sine to simulate a high kick.


uhm i think im misunderstanding because my poor english > <
i can use density because my ball go automatically down on the layout.. i need anithing ballistic similar to bullet behavior but working without gravity
sorry my bed English ^_^
B
14
S
7
G
7
Posts: 549
Reputation: 6,075

Post » Thu Mar 09, 2017 7:20 pm

NN81 wrote:uhm i think im misunderstanding because my poor english > <
i can use density because my ball go automatically down on the layout.. i need anithing ballistic similar to bullet behavior but working without gravity


I would forget using physics all together then and set the ball to a bullet behavior with bounce. That will be easier to use speed settings and then you can use Sine behavior to simulate the ball arcing up for a high kick.

On a flat play field like you have physics is not going to give you much to work with.

You will want your players set to solids so the ball will bounce when they collide and then a simple kick animation should work well.
Banned User
B
28
S
7
G
58
Posts: 1,229
Reputation: 34,830

Post » Thu Mar 09, 2017 8:26 pm

lamar wrote:
NN81 wrote:uhm i think im misunderstanding because my poor english > <
i can use density because my ball go automatically down on the layout.. i need anithing ballistic similar to bullet behavior but working without gravity


I would forget using physics all together then and set the ball to a bullet behavior with bounce. That will be easier to use speed settings and then you can use Sine behavior to simulate the ball arcing up for a high kick.

On a flat play field like you have physics is not going to give you much to work with.

You will want your players set to solids so the ball will bounce when they collide and then a simple kick animation should work well.


by the way, I do not pretend to do something super realistic like FIFA gameplay !! I'd settle for something much simpler without having to resort to complex behavior .. any alternative idea (without physics)?

EDIT that to which I refer is a play a kind of basic physical with basic commands without having to resort to the features and parameters of physics behavior on the objects.. also because 22 players plus the ball are already 23 objects, and the management of physical and various movements for so much objects they begin to be heavy for the cpu..
sorry my bed English ^_^
B
14
S
7
G
7
Posts: 549
Reputation: 6,075


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests