
Trigonometry Trigonometry Math Forum 
 LinkBack  Thread Tools  Display Modes 
April 23rd, 2019, 07:46 PM  #1 
Newbie Joined: Apr 2019 From: Sydney, Australia Posts: 1 Thanks: 0  Making a formula that finds the horizontal and vertical distance between two points t
I am making a Scratch 3.0 game. The shooter sprite is holding a gun slightly offcentre (see images), and I need the bullet to go to the end of the barrel of the gun before travelling forward (as so it would appear the bullet it leaving the gun). The issue is, to do this, I need to find the X and Y distance of the end of the barrel from the centre of the shooter sprite (Scratch doesn't let you use diagonal distances ðŸ˜¡). The X and Y distances change as the sprite rotates. I know if the shooter sprite is facing 90Âº (right angle), the X distance to the gun is 105 pixels, and the Y distance is 45 pixels. The computer always knows what direction the shooter sprite is facing. What about the distances for all the other angles the shooter sprite is facing? Do I need a special formula?Background (2).png Background (1).png 
April 23rd, 2019, 08:36 PM  #2 
Senior Member Joined: Aug 2012 Posts: 2,355 Thanks: 737 
Your images need to be online somewhere that can be linked. They're not showing up here.

April 23rd, 2019, 10:35 PM  #3 
Global Moderator Joined: Dec 2006 Posts: 20,921 Thanks: 2203 
In general, forums don't support hotlinking to images hosted on other forums, but there are forumfriendly image hosting sites that can easily be found. To upload an image here, try using the Go Advanced button and then the attachments (paperclip) icon. There's a size limit for such attached images. 

Tags 
angles, coordinates, distance, finds, formula, horizontal, making, points, trig functions, trigonometry, vertical 
Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Zenith angle & Azimuth to vertical and horizontal distance  Morelo  Trigonometry  0  September 19th, 2014 02:50 AM 
Horizontal & Vertical Asymptotes  Shamieh  Calculus  2  September 7th, 2013 05:32 PM 
Finding horizontal and vertical tangents of a graph?  happytee  Calculus  6  April 28th, 2012 06:20 PM 
Identify any vertical, horizontal, or slant asymptotes  lovetolearn  Calculus  1  March 31st, 2012 07:11 PM 
Give the equation of the horizontal and vertical asymptote  rowdy3  Calculus  6  May 10th, 2010 07:43 PM 