Pool Billard move. How to?

UltimateCreativesUltimateCreatives Member Posts: 27
edited November -1 in Working with GS (Mac)
Hello.

Can anyone drop an idea hot to make a ball movement like in for example pool bilard games?
I have 5 attributes:

- position1X
- position1Y
- position2X
- position2Y
- touch

and rules like that:

When ball recive touch is pressed and touch is inside: constrain attrubute selfX to position1X and same for Y.

When ball recive touch is pressed: change attribute touch to true, otherwise false.

When ball touch is released, touch is outside and attribute touch is true: constrain attribute position2X to touch position x and the same for Y, and move (vector to angle (position1X-position2X, position1Y-position2Y)) and for the end interpolate motion linear velocity for X and Y to 0.

BUT ...

it doesn't work.

Can anyone help me please hot to repair and make it works?

Kind regards and many thanks

Comments

Sign In or Register to comment.