Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7033527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:04:35+00:00 2026-05-28T01:04:35+00:00

I’m trying to program an arrow flying in the air, but the speed doesn’t

  • 0

I’m trying to program an arrow flying in the air, but the speed doesn’t look well.

But now the arrow moves very slow, here’s a
sample.

(I know the arrow and the trajectory don’t match 100%, it’s just a sample.)

//...

var inity0:Number = 50;
var initangle:Number = - Math.PI / 4;
var initvelocity:Number = 100;
var initvx:Number = initvelocity * Math.cos(initangle);
var initvy:Number = initvelocity * Math.sin(initangle);
var currentvx:Number = new Number(initvx);
var currentvy:Number = new Number(initvy);
var initdistance:Number = math.calcDistance(inity0,initvelocity,initangle);

currentvy -= 9.81 / stage.frameRate;
activearrow.x += currentvx / stage.frameRate;
activearrow.y -= currentvy / stage.frameRate;

//...

Any ideas?

EDIT:
I’ve changed the following code:

currentvy -= 9.81 / stage.frameRate * 15;
activearrow.x += currentvx / stage.frameRate * 15;
activearrow.y -= currentvy / stage.frameRate * 15;

And now it looks good, but can someone tell me why I need to do this while in physics it normally would fly 15 times too fast?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T01:04:36+00:00Added an answer on May 28, 2026 at 1:04 am

    Surely, you just need to specify a greater value for initvelocity until you find a speed you consider suitable?

    Edit:

    There’s nothing to relate your distances and absolute positions to anything in the physical world. Very little in reality is measured in ‘pixels per second’. Your statement currentvy -= 9.81 / stage.frameRate;, if I understand how flash is working (it’s been a while, too), is effectively setting the vertical deceleration at 9.81 pixels per second squared (not metres), which is understandably slow. Alternatively, if you consider that your calculations are effectively scaled at 1 pixel = 1 metre, the speed isn’t necessarily unreasonable, but you do have an incredibly large bow and arrow!

    You simply need to apply some scale to approximate something ‘reasonable’. No real science to it, to be honest.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I am trying to render a haml file in a javascript response like so:
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.