PDA

Click to See Complete Forum and Search --> : Cos and maths in creating a ball game



boadle
03-22-2002, 05:28 AM
Here's a semi-theoretical question for you experts:

I've been working on a 3D ball engine, based on the Chapter 10 Fla files in Flash Studio (Friends of Ed) from Wireframe. I have now reached the stage where I need to change the functionality, but my maths knowledge is not sufficient to let me do what I need to, and that's where you guys come in.

It's the code that has those cubes made up of 8 'spheres' that spin in 3D.

I've changed the array that specifies the start positions of all 8, to contain only one sphere.

The solitary ball now spins on it's own, as directed by cos.

I want the user to be able to 'kick' the ball, based on their interaction, at an angle and speed of their choosing.

I've realised that I need to implement gravity and curve by using a varying radius size (ie a bigger arc eill show less curve over a finite distance.

My problem is that currently, the circles path is centred to the stage. What I need to do is centre the one remaining ball to the stage, in it's static state. Thus I presume I need to do a calculation based on the radius, and move the clip as apt.

Can anyone help me with this? Or would you need to see the code? Does anyone happen to have Chapter 10 fla, Movie 10 handy (forgot to bring it to work).

Thanks in advance...

Lewis

Ed Mack
03-22-2002, 07:43 AM
Flash Studio? I have Flash AS Studio, I wonder if the 3d in it is the same. In AS Studio, they build a matrix manipulation library (though I never got it to work and used other methods).

boadle
03-22-2002, 09:29 AM
Hhmmm. How does that work Ed?