A Flash Developer Resource Site

Results 1 to 19 of 19

Thread: Adjusting Angles of a Physics Engined object

Hybrid View

  1. #1
    Member
    Join Date
    Dec 2007
    Posts
    85
    After looking through my code and at the formula given, I can get all but gravity. Should I just try working with a hard-coded number for gravity, or is there a way I could "make" gravity with the FPS of the Flash and aspects of the engine that define gravity?

  2. #2
    Senior Member
    Join Date
    Oct 2007
    Location
    Leeds, UK
    Posts
    118
    I don't know how these engines work, so it's diffcult for me to advise you.

    My guess is you could start with a hard-coded value for g and play around with it until you get something that looks right.

    If it helps, the horizontal range of a shell - that's the distance it travels horizontally before coming back down to earth (assuming it doesn't hit anything on the way!) - should be 2HV/g (assuming no air resistance).

  3. #3
    Member
    Join Date
    Dec 2007
    Posts
    85
    Ok, tried inputting a hard number. Actually, I used several. Each time, I hit the same thing: The numbers were simply TOO small to be of any use to me.

    This, of course, could be because of the velocities, but I doubt it.

    I used the same formula, got the values for the initial vertical and horizontal velocities, got the distance traveled, and hardcoded a gravity that accurately matched the force I used earlier to "create" gravity. However, the results always came out to be between -0.1 and -0.2, which just seemed useless to me. Is there anything missing by chance?

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