My Math Forum Making a formula that finds the horizontal and vertical distance between two points t

 Trigonometry Trigonometry Math Forum

 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 off-centre (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,411 Thanks: 754 Your images need to be online somewhere that can be linked. They're not showing up here. Thanks from Joppy
 April 23rd, 2019, 10:35 PM #3 Global Moderator   Joined: Dec 2006 Posts: 21,034 Thanks: 2269 In general, forums don't support hot-linking to images hosted on other forums, but there are forum-friendly 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.

 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post Morelo Trigonometry 0 September 19th, 2014 02:50 AM Shamieh Calculus 2 September 7th, 2013 05:32 PM happytee Calculus 6 April 28th, 2012 06:20 PM lovetolearn Calculus 1 March 31st, 2012 07:11 PM rowdy3 Calculus 6 May 10th, 2010 07:43 PM

 Contact - Home - Forums - Cryptocurrency Forum - Top