3 Replies - 1695 Views - Last Post: 16 November 2010 - 05:32 PM

#1 Guest_jason*


Reputation:

Getting bullet to start at gun

Posted 15 November 2010 - 02:02 PM

Hey guys ive got a player and then when i double click it i've got a gun and body and i want the bullets to start of at the gun ive tried various methods to get around this does anyone know how i can do it so it start of at the gun as my player rotates and moves and if i add an invis line to start at the gun i have to make its main point where i want it to rotate and that is in the center of my player

plz help ive been trying to do this for 2 days now if u dont understand my question plz say and ill try speak it again

its basicly wondering how i can get my bullets to start at the gun instead of the center of the player

thanks for reading much appreciated

Is This A Good Question/Topic? 0

Replies To: Getting bullet to start at gun

#2 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 10803
  • View blog
  • Posts: 40,257
  • Joined: 27-December 08

Re: Getting bullet to start at gun

Posted 15 November 2010 - 02:22 PM

What problems are you experiencing with your existing code? Also, can you post your current code?
Was This Post Helpful? 0
  • +
  • -

#3 Guest_jason*


Reputation:

Re: Getting bullet to start at gun

Posted 15 November 2010 - 10:42 PM

im not looking for coding help of the sorta but simply how developers do it do they make an invisible line that follows the player and then create a bullet from that i could do what i want to do if i knew how to make the object not rotate from where the little + is ican do this in flash by using the third tool and moving the circle but when i use action scirpt 2.0 it rotates it from the cross thingo so if i try to make an invis line that follows the players weapon i have to make it rotate from the center of the player so when i spawn a bullet it goes fromthe center of the player ...
can anyone help thanks if u dont understand plz say again .
Was This Post Helpful? 0

#4 Jason Fields  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 2
  • Joined: 16-November 10

Re: Getting bullet to start at gun

Posted 16 November 2010 - 05:32 PM

If I understand what you're trying to do, you'll need some trig functions. If you don't know how to use trigonometry, here's a nice tutorial on how to use it so figure stuff out in flash:
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1