-
Re: 360 degree shooting
this is getting real hard, math makes my head hurt.
is this the code you are refering to?:
Set angle to: 180-ATan(((Y( "Laser" )-targetY( "Laser" ))*1.0)/((X( "Laser" )-targetX( "Laser" ))*1.0))
that code doesn't seem to rotate from object A to B, and it seems it will only rotate the angle of the active object, not its path ... won't it? Is there a way I can calculate the X and Y position of the crosshair and create a value between 0 - 360 so I can add it to the original code you mentioned above?
-
Re: 360 degree shooting
this is getting real hard, math makes my head hurt.
is this the code you are refering to?:
Set angle to: 180-ATan(((Y( "Laser" )-targetY( "Laser" ))*1.0)/((X( "Laser" )-targetX( "Laser" ))*1.0))
that code doesn't seem to rotate from object A to B, and it seems it will only rotate the angle of the active object, not its path ... won't it? Is there a way I can calculate the X and Y position of the crosshair and create a value between 0 - 360 so I can add it to the original code you mentioned above?
-
Re: 360 degree shooting
the x("laser") is the x position of the shooter and targetX("laser") is the x position of the crosshair.
note: there are two events in that code right after each other, both are needed to cover the full 360 degree spectrum.
Save the angle between the shooter and the crosshair somewhere and apply it to all bullets it shoots.
-
Re: 360 degree shooting
the x("laser") is the x position of the shooter and targetX("laser") is the x position of the crosshair.
note: there are two events in that code right after each other, both are needed to cover the full 360 degree spectrum.
Save the angle between the shooter and the crosshair somewhere and apply it to all bullets it shoots.
-
Re: 360 degree shooting
okay thx, but I've no idea to add this new code to the old one you gave me... I know I'm real slow <img src="/center/images/graemlins/frown.gif" alt="" />
-
Re: 360 degree shooting
okay thx, but I've no idea to add this new code to the old one you gave me... I know I'm real slow <img src="/center/images/graemlins/frown.gif" alt="" />
-
Re: 360 degree shooting
[]Give me a break, I got an E in math. Anyways, I figured it out. The code is more like this I presume:
Alterable Value D( "bullet" )+Cos(Alterable Value B( "bullet" ))*Alterable Value F( "bullet" )
still don't understand that first part [/]
Ok.. sorry! It's just that I find that very simple...
-
Re: 360 degree shooting
[]Give me a break, I got an E in math. Anyways, I figured it out. The code is more like this I presume:
Alterable Value D( "bullet" )+Cos(Alterable Value B( "bullet" ))*Alterable Value F( "bullet" )
still don't understand that first part [/]
Ok.. sorry! It's just that I find that very simple...
-
Re: 360 degree shooting
"Ok.. sorry! It's just that I find that very simple..."
heh, no problem. It's just me who's stupid I guess
-
Re: 360 degree shooting
"Ok.. sorry! It's just that I find that very simple..."
heh, no problem. It's just me who's stupid I guess