# soccer ball phisics

Get help using Construct 2

### » 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?
B
19
S
8
G
8
Posts: 595
Reputation: 6,915

### » 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
29
S
7
G
58
Posts: 1,229
Reputation: 34,900

### » 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
B
19
S
8
G
8
Posts: 595
Reputation: 6,915

### » 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
29
S
7
G
58
Posts: 1,229
Reputation: 34,900

### » 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
B
19
S
8
G
8
Posts: 595
Reputation: 6,915

### » 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
29
S
7
G
58
Posts: 1,229
Reputation: 34,900

### » 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
B
19
S
8
G
8
Posts: 595
Reputation: 6,915

### » 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
29
S
7
G
58
Posts: 1,229
Reputation: 34,900

### » 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..
B
19
S
8
G
8
Posts: 595
Reputation: 6,915