Page 1 of 1

Passive Homing Missile

PostPosted: Thu May 09, 2013 12:26 pm
by Luezma
Hi guys, if I already post a topic about this, make me know.

Well, I only wanna see what do you think about my missile, and see your suggestions too, because I stopped working on it for a few months and I don't know what to improve to it.

I'll accept any idea.

Rating: rated 5
Filesize: 4.21 kB
Comments: 2
Ratings: 1
download

Re: Passive Homing Missile

PostPosted: Mon May 13, 2013 10:14 pm
by Sonic
Just out of curiosity, how are you making the camera follow the little circle?

Re: Passive Homing Missile

PostPosted: Mon May 13, 2013 11:05 pm
by jon_joy_1999
my response does not imply that I suggest the use of this function, nor that I will not hunt you down and stab you in the eyes with a spoon repeatedly if you do use this function

Code: Select all
        _Vel > +inf ? {entity.vel = entity.vel / 1.0750000} : {};
        Scene.camera.Pan = Scene.camera.Pan - ((Scene.camera.Pan - (entity.pos + (entity.vel / 6.5000000))) / 4);

Re: Passive Homing Missile

PostPosted: Tue May 14, 2013 1:22 am
by Luezma
jon_joy_1999 wrote:my response does not imply that I suggest the use of this function, nor that I will not hunt you down and stab you in the eyes with a spoon repeatedly if you do use this function

Code: Select all
        _Vel > +inf ? {entity.vel = entity.vel / 1.0750000} : {};
        Scene.camera.Pan = Scene.camera.Pan - ((Scene.camera.Pan - (entity.pos + (entity.vel / 6.5000000))) / 4);

Well, the velocity limiter is just for fun, I can delete it. The camera PAN changing is just some stuff, nothing nessesary

Re: Passive Homing Missile

PostPosted: Thu May 16, 2013 5:37 am
by Xray
jon_joy_1999 wrote:my response does not imply that I suggest the use of this function, nor that I will not hunt you down and stab you in the eyes with a spoon repeatedly if you do use this function

Code: Select all
        _Vel > +inf ? {entity.vel = entity.vel / 1.0750000} : {};
        Scene.camera.Pan = Scene.camera.Pan - ((Scene.camera.Pan - (entity.pos + (entity.vel / 6.5000000))) / 4);


That's a very strange script! Could you please explain how it works and what it does? And why the strange math, such as entity.vel / 1.075 and entity.vel / 6.5? Also, why do you check to see if _Vel is > +inf? !!! How can any variable be greater than infinity? Also where does _Vel get defined?

Thanks

EDIT: I just realized that _Vel was defined in luezma's scene. But I still don't understand the rest of the script.

Re: Passive Homing Missile

PostPosted: Sat May 18, 2013 7:53 pm
by Luezma
Xray wrote:
jon_joy_1999 wrote:my response does not imply that I suggest the use of this function, nor that I will not hunt you down and stab you in the eyes with a spoon repeatedly if you do use this function

Code: Select all
        _Vel > +inf ? {entity.vel = entity.vel / 1.0750000} : {};
        Scene.camera.Pan = Scene.camera.Pan - ((Scene.camera.Pan - (entity.pos + (entity.vel / 6.5000000))) / 4);


That's a very strange script! Could you please explain how it works and what it does? And why the strange math, such as entity.vel / 1.075 and entity.vel / 6.5? Also, why do you check to see if _Vel is > +inf? !!! How can any variable be greater than infinity? Also where does _Vel get defined?

Thanks

EDIT: I just realized that _Vel was defined in luezma's scene. But I still don't understand the rest of the script.


First: "+inf" is an constant variable, here it means the maximum speed that the ship can get, if you change "+inf" to "2", if will start dividing the ship's speed by 1.075 until it reaches 2m/s, that makes deceleration and works to limit speed.

Second: "_Vel" is the magnitude of the "entity.vel" vector, it is to see the current speed of the entity.

Third:
Code: Select all
Scene.camera.Pan = Scene.camera.Pan - ((Scene.camera.Pan - (entity.pos + (entity.vel / 6.5000000))) / 4);

This script works to move the camera (with some damping) where is the current position plus the speed divided by 6.5. If you change the "4" in the last division, you will change the camera damping, when bigger, more damping

Re: Passive Homing Missile

PostPosted: Fri May 24, 2013 3:58 am
by Luezma
Xray wrote:
jon_joy_1999 wrote:my response does not imply that I suggest the use of this function, nor that I will not hunt you down and stab you in the eyes with a spoon repeatedly if you do use this function

Code: Select all
        _Vel > +inf ? {entity.vel = entity.vel / 1.0750000} : {};
        Scene.camera.Pan = Scene.camera.Pan - ((Scene.camera.Pan - (entity.pos + (entity.vel / 6.5000000))) / 4);


That's a very strange script! Could you please explain how it works and what it does? And why the strange math, such as entity.vel / 1.075 and entity.vel / 6.5? Also, why do you check to see if _Vel is > +inf? !!! How can any variable be greater than infinity? Also where does _Vel get defined?

Thanks

EDIT: I just realized that _Vel was defined in luezma's scene. But I still don't understand the rest of the script.

1. +inf is the speed that must reach to divide the speed, is +inf by now because it doesn't have limits
2. I'm dividing a vector, is the same thing that this:
Code: Select all
vector * (1 / value)