Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / spin on a physics enabled cue ball

Author
Message
shadey
14
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 12th Oct 2020 22:00 Edited at: 12th Oct 2020 22:10
how would I create say backspin on a cue ball.. trying a pool sim: here is a demonstration :
[video=youtube]4FtPbgWt73k&ab[/video]

tis an old video and since has changed, I coded a 3d game engine which has undergone many changes but feel confident enough to now actually make something with it, the damping is now set to 0.5 for the pool balls so they actually slow down, the restitution I set to 1.0 on the pool balls and the cushions, friction is set to 0.5 on both the table top and the pool balls, I am shooting the ball in the direction of the compass surrounding the ball of course! the physics world size is set to 20 and gravity to -6 with the mass for the pool balls set at 10
, dunno if all them values are correct but it seems ok, my only problem is the cue ball 'follows through' the shot head on hence i want to add spin to the cue ball! to shoot the ball I am simply saying:
Hail to the king, baby!
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 12th Oct 2020 22:16
The vector needs to have a downward angle, just like when playing pool
You probably need to fiddle with friction etc
shadey
14
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 12th Oct 2020 22:20 Edited at: 12th Oct 2020 22:22
I try and get damping and friction values correct, along with gravity, just cannot quite get it right! if i choose too much gravity for instance then it makes the damping less of an influence on slowing down / stopping the ball, yet too little gravity and the balls can possibly fly off the table... dunno how to do this downward angle also! Anyhow is that not to swerve a shot in real life pool, rather than putting english (spin) on it?? hmmm!!!
Hail to the king, baby!
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 12th Oct 2020 22:24
Well i guess you could just fake it with angular velocity
shadey
14
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 12th Oct 2020 22:30
yeh,i would need to start registering physics collisions then with each ball..but huh! if that is the only way...
Hail to the king, baby!
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 12th Oct 2020 22:56
Why would you need to register collisions?
shadey
14
Years of Service
User Offline
Joined: 25th Jan 2010
Location:
Posted: 12th Oct 2020 23:02
to know when to reverse the angular velocity? if that is what you mean by faking it!
Hail to the king, baby!
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 12th Oct 2020 23:06
No. I mean just apply angular velocity to the que ball to simulate english or swerve

Login to post a reply

Server time is: 2024-04-16 21:34:14
Your offset time is: 2024-04-16 21:34:14