A Flash Developer Resource Site

Search:

Type: Posts; User: Nialsh

Page 1 of 14 1 2 3 4

Search: Search took 0.16 seconds.

  1. Replies
    4
    Views
    17,089

    This is a great way to teach physics. I...

    This is a great way to teach physics. I definitely understand LRC circuits better for having played with this. I also have a lot of suggestions.


    The dynamic text boxes on the bottom should be...
  2. Thread: calculation

    by Nialsh
    Replies
    1
    Views
    14,090

    var x = /* user input */ if (x < 10) { //...

    var x = /* user input */
    if (x < 10) {
    // bottom unbounded range x < 10
    } else if (x < 15) {
    // 10 <= x < 15
    } else if (x < 20) {
    // 15 <= x < 20
    } else {
    // top unbounded range x...
  3. Replies
    1
    Views
    13,804

    I'm not aware of a tutorial but generally...

    I'm not aware of a tutorial but generally speaking, that system is called an inverted pendulum.

    You can find a lot more about it here http://en.wikipedia.org/wiki/Inverted_pendulum
  4. Replies
    3
    Views
    18,136

    If you're pretty certain that you won't change...

    If you're pretty certain that you won't change your mind about representing the player's shape as a non-rotating rectangle, you can keep the math simple. Just check to see which dimension has the...
  5. Replies
    3
    Views
    18,136

    You're checking the vertical cases before the...

    You're checking the vertical cases before the horizontal cases, so they're winning every time.

    Try making them weaker.



    function CollisionObjectTile(object)
    {
    var BOUNCE = 0.5;
    var...
  6. Replies
    1
    Views
    472

    It depends how realistic you want to get. Like...

    It depends how realistic you want to get. Like if you drive off a ramp, should the bike stay airborne for a couple of seconds? Should it behave like this game?...
  7. That site looks like it gives a pretty thorough...

    That site looks like it gives a pretty thorough explanation of what needs to be done.

    I assume you're trying to implement a function like this


    import flash.geom.Vector3D;

    function...
  8. Replies
    3
    Views
    7,142

    What you're talking about is "continuous" versus...

    What you're talking about is "continuous" versus "discrete" physics simulation.

    Until you start dealing with collisions, continuous simulation is actually quite easy. The arcs you see in Sling...
  9. Thread: Ball physics?

    by Nialsh
    Replies
    1
    Views
    4,868

    Check out the last section of this page on pool...

    Check out the last section of this page on pool physics http://archive.ncsa.illinois.edu/Classes/MATH198/townsend/math.html

    It even tells you how to calculate the spin, if you're into that sort of...
  10. At the end of HitTestPoint.as, I uncommented ...

    At the end of HitTestPoint.as, I uncommented


    camera.x = player.x;
    camera.y = player.y;
    and that seemed to fix it...

    I'm using CS5 if that means anything.
  11. Replies
    5
    Views
    5,227

    Interesting question. I think I figured...

    Interesting question. I think I figured something out.

    Let's say the normal vector for a flat sprite is pointing out of the page (ie. <0,0,-1>). You can use your the transformation matrix from...
  12. Replies
    5
    Views
    5,227

    Normally sprites are 2D so I'm not sure what you...

    Normally sprites are 2D so I'm not sure what you would be doing with a 3D vector...

    Can you give an example of what you're doing?
  13. Suthers, Welcome to flashkit, I see you've...

    Suthers,

    Welcome to flashkit, I see you've found all the old threads.


    If you look at Adobe's documentation, the parameters for atan2 are actually (y,x)....
  14. Replies
    8
    Views
    7,658

    If you points are A and B, your normals are:...

    If you points are A and B, your normals are:
    <By-Ay, Ax-Bx>
    <Ay-By, Bx-Ax>
  15. Replies
    8
    Views
    7,658

    How is your line defined? Is it a line segment...

    How is your line defined? Is it a line segment formed by two points?
  16. Replies
    8
    Views
    7,658

    A line has two normal vectors, pointing in...

    A line has two normal vectors, pointing in opposite directions.

    If you know the angle of the line (theta) in radians, the angles of the normal vectors are:
    theta+PI/2
    theta-PI/2

    Or if you...
  17. Replies
    8
    Views
    7,658

    Not sure what you mean. Why don't you draw a...

    Not sure what you mean. Why don't you draw a picture and post it?
  18. Cool game. I agree the controls could use some...

    Cool game. I agree the controls could use some help. But it came together nicely.

    Here's how I would set power. http://megaswf.com/view/1f6a1593a9de3086ce223c46f400613b.html

    And maybe make...
  19. Replies
    5
    Views
    5,327

    Here you go. I fixed that other code but decided...

    Here you go. I fixed that other code but decided it was the wrong approach, so here's another take.


    function onRollOver():Void {
    lightning._alpha = 100;
    videostopped = true;
    var xOffset...
  20. Replies
    5
    Views
    5,327

    Yeah, you can get away with just one arrow. ...

    Yeah, you can get away with just one arrow. Here's some code off the top of my head.



    function onRollOver():Void {
    lightning._alpha = 100;
    videostopped = true;

    var...
  21. Replies
    3
    Views
    5,440

    length of BC = L*tan(angle CAB) length of BD =...

    length of BC = L*tan(angle CAB)
    length of BD = L*tan(angle DAB)

    Tangent is a good function to know. http://en.wikipedia.org/wiki/Trigonometric_functions#Tangent

    In Flash it's Math.tan(). ...
  22. Replies
    3
    Views
    2,063

    Put that command in an onEnterFrame?

    Put that command in an onEnterFrame?
  23. Replies
    10
    Views
    1,106

    This should do it. var feet=(6*ammount)/100;...

    This should do it.


    var feet=(6*ammount)/100;
    var inches=Math.floor(12*(feet-Math.floor(feet)));
    feet=Math.floor(feet);
    if(feet == 0)
    loader.feettext.text="";
    else
    ...
  24. Replies
    7
    Views
    6,378

    I've never seen a Flash program that allocated...

    I've never seen a Flash program that allocated too much memory. Making things invisible can make improve speed because it reduces the rendering time. But I wouldn't worry about it - just write your...
  25. Replies
    7
    Views
    6,378

    Yeah, I don't know why nobody answered you... ...

    Yeah, I don't know why nobody answered you...

    What you're talking about is called "rigid body dynamics". It's a branch of physics that describes the way rigid objects move (and collide) in space....
Results 1 to 25 of 338
Page 1 of 14 1 2 3 4




Click Here to Expand Forum to Full Width

HTML5 Development Center