A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Cos and maths in creating a ball game

  1. #1
    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

  2. #2
    Gross Pecululatarian Ed Mack's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    2,954
    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).

  3. #3

    3D

    Hhmmm. How does that work Ed?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center