Further to my last post, I have printed some variable values to the screen when the problem occurs as follows:

[code]

dxy = 11.183594089759662
cs = -0.9113209567523853
sc = -0.41169662833683374
vp1 = 10.423261322708719
vp2 = 0
dt = 1.6133535742410243
firstBallRef.tempX = 150.00761013707466
firstBallRef.tempY = 179.69153092093967
secondBallRef.tempX = 120.18423352873543
secondBallRef.tempY= 104.91271705850214
firstBallRef.horizontalVelocity = 5.118247803194922
firstBallRef.verticalVelocity = -1.4318442742343485
secondBallRef.horizontalVelocity = -6.0840764405175305
secondBallRef.verticalVelocity = -21.748043021508227
dxy = 20.415665302423797
cs = 0.9706157589148952
sc = -0.24063467860236176
vp1 = -0.6719671288981877
vp2 = 0
dt = -11.286764443391895
firstBallRef.tempX = 32.46887484970526
firstBallRef.tempY = -133.54646421285148
secondBallRef.tempX = 227.71535867903015
secondBallRef.tempY= 338.4591812713536
firstBallRef.horizontalVelocity = 1.6874473756267157
firstBallRef.verticalVelocity = -0.6207144175197532
secondBallRef.horizontalVelocity = -7.771523816144245
secondBallRef.verticalVelocity = -21.12732860398847
dxy = 21.703543611196096
cs = -0.23089377668368133
sc = 0.9729789637442047
vp1 = -2.342372578705536
vp2 = -18.295318544168257
dt = 0.3946892569206588
firstBallRef.tempX = 179.14739832875304
firstBallRef.tempY = 163.96685005743075
secondBallRef.tempX = 174.03981574604762
secondBallRef.tempY= 200.25638673254542
firstBallRef.horizontalVelocity = 4.778078082260453
firstBallRef.verticalVelocity = -20.52327562601023
secondBallRef.horizontalVelocity = -7.70027935503791
secondBallRef.verticalVelocity = -1.3810100832728573
dxy = 14.346250582823185
cs = -0.9694056603163411
sc = -0.24546418424413502
vp1 = 0.4042924324869883
vp2 = 0
dt = 33.77196385593056
firstBallRef.tempX = 37.17943584519696
firstBallRef.tempY = 836.9689122027011
secondBallRef.tempX = 316.72790067410847
secondBallRef.tempY= -553.4474215064265
firstBallRef.horizontalVelocity = 0.4152722629195494
firstBallRef.verticalVelocity = 0.08786827300331551
secondBallRef.horizontalVelocity = 4.344665927632815
secondBallRef.verticalVelocity = -20.53322763415942

[/code]

I notice the value of dt is very high e.g dt = 33.77196385593056

Should dt have such a high value and if not, any idea why it is having this value?

Thank you

Paul