Question about CoF CoR and

General discussions about the tennis games Tennis Elbow
Forum rules
Speak English and don't hijack topics, troll, use profanities nor insults

Re: Question about CoF CoR and

Postby nickkyrgiosfan » 13 Apr 2024, 05:47

Hello, I have been looking for ways to slow down the speed of the game and I found this thread but I am not sure I understand how CoF and CoR work. Does increasing CoF proportionally slow down the ball after a bounce ? Also, when modding the CoR1, 2, 3, can I choose any angle values I want ? Because you said that CoR0 was for 16, CoR1 and CoR3 are for 90, and CoR2 are for 0, but could I change it like this ? Like

CoR0 0.85 10
CoR1 0.9 7
CoR2 1.0 3

Here Im chosing 10, 7 and 3 as the incoming angles since apparently most tennis strokes are inside that range
nickkyrgiosfan
tennis fan
tennis fan
 
Messages: 12
Gaming Since: 01 Apr 2024, 05:01

Re: Question about CoF CoR and

Postby manutoo » 13 Apr 2024, 06:46

nickkyrgiosfan,
1) CoF = (vx1 − vx2) / (vy2 − vy1)
=> CoF * (vy2 − vy1) = (vx1 − vx2)
=> vx2 = vx1 - CoF * (vy2 − vy1)
(v1 = incoming speed ; v2 = after-bounce speed)
So it's not proportional.

2) You can indeed specify the angle for each CoRx as you did in your example.
Maybe having a CoR of 1 could lead to CoR above 1 on other angles... :thinking:
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 18768
Gaming Since: 24 Jan 2004, 15:38
Location: France

Re: Question about CoF CoR and

Postby nickkyrgiosfan » 13 Apr 2024, 06:54

Why would it lead to that? If I only have these three CoRs, what angles would have a higher CoR than 1.0 ?
nickkyrgiosfan
tennis fan
tennis fan
 
Messages: 12
Gaming Since: 01 Apr 2024, 05:01

Re: Question about CoF CoR and

Postby manutoo » 14 Apr 2024, 06:05

The formula is very complicated so I'm not sure, but extrapolating your values would make the CoR at an angle of 0 above 1.
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 18768
Gaming Since: 24 Jan 2004, 15:38
Location: France

Re: Question about CoF CoR and

Postby nickkyrgiosfan » 14 Apr 2024, 08:16

Ok, could you tell me what formula that is ? I want to try out different combinations
nickkyrgiosfan
tennis fan
tennis fan
 
Messages: 12
Gaming Since: 01 Apr 2024, 05:01

Re: Question about CoF CoR and

Postby manutoo » 15 Apr 2024, 05:36

The formula is quite complicated and involves many things that are top secrets... :P

Just test your values in the game and if you notice anything weird, tune them a bit.

In real life, a CoR of 1 is physically not possible.
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 18768
Gaming Since: 24 Jan 2004, 15:38
Location: France

Re: Question about CoF CoR and

Postby nickkyrgiosfan » 15 Apr 2024, 07:06

Oh I see, I'm just looking for a way to increase the CoR but more for flat balls than for topspin balls. So I want to increase it for low angled balls and keep it more or less the same for high angled balls, but I'm having difficulty.

Also, is the CoF capped at 0.99 ? There doesn't seem to be any effect when I put a higher CoR than this
nickkyrgiosfan
tennis fan
tennis fan
 
Messages: 12
Gaming Since: 01 Apr 2024, 05:01

Re: Question about CoF CoR and

Postby manutoo » 16 Apr 2024, 05:26

The CoF isn't capped in my code, but I guess that the physics formula makes it so that it doesn't change anything to have it above 0.99. :thinking:
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 18768
Gaming Since: 24 Jan 2004, 15:38
Location: France

Re: Question about CoF CoR and

Postby nickkyrgiosfan » 16 Apr 2024, 07:01

What do you mean by this exactly? Shouldn't it still have some effect if raised to more than 0.99 ?
nickkyrgiosfan
tennis fan
tennis fan
 
Messages: 12
Gaming Since: 01 Apr 2024, 05:01

Re: Question about CoF CoR and

Postby manutoo » 17 Apr 2024, 06:32

Physically, it's not possible to have more speed after the bounce than before, so a CoF above 1 doesn't mean anything and it's possible that the formula reflects that.
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 18768
Gaming Since: 24 Jan 2004, 15:38
Location: France

Re: Question about CoF CoR and

Postby nickkyrgiosfan » 17 Apr 2024, 20:07

Wait, I thought the higher the CoF was, the slower the speed after bounce, no ? The CoF is higher in clay courts and slower in grass and hard courts
nickkyrgiosfan
tennis fan
tennis fan
 
Messages: 12
Gaming Since: 01 Apr 2024, 05:01

Re: Question about CoF CoR and

Postby manutoo » 18 Apr 2024, 05:11

Ooops, you're right ! I mixed that with the old TE2013's Friction value ! :P

So in TE4, the bounce physics take into account the topspin : after a certain level of ball topspin, depending on the CoF and other parameters, the ball bounce actually ignores the CoF value and has the same horizontal speed loss whatever the surface is. This is what makes all surface looks the same in real life, because everybody has put more topspin in the ball since the early 2000's (and the change of cords).

After, for the specificity of the calculations when the CoF is 1, I totally forgot and I'm not digging into the code to check... :fear:
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 18768
Gaming Since: 24 Jan 2004, 15:38
Location: France

Previous

Return to Tennis Elbow 4

Who is online

Users browsing this forum: ClaudeBot, Yandex [Bot] and 8 guests