Passive Homing Missile

Discuss scenes and videos made with Algodoo.

Passive Homing Missile

Postby Luezma » Thu May 09, 2013 12:26 pm

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
Luezma
 
Posts: 14
Joined: Thu Dec 13, 2012 7:19 pm
Location: Argentina

Re: Passive Homing Missile

Postby Sonic » Mon May 13, 2013 10:14 pm

Just out of curiosity, how are you making the camera follow the little circle?
I do stuff and break things. You know how it is.
Image
User avatar
Sonic
 
Posts: 1467
Joined: Tue Sep 01, 2009 6:18 pm
Location: America!!!

Re: Passive Homing Missile

Postby jon_joy_1999 » Mon May 13, 2013 11:05 pm

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);
Image
BSrac = BoincStats recent average credit
I'd rather be network computing.
jon_joy_1999
 
Posts: 233
Joined: Fri Dec 09, 2011 12:51 am

Re: Passive Homing Missile

Postby Luezma » Tue May 14, 2013 1:22 am

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
Luezma
 
Posts: 14
Joined: Thu Dec 13, 2012 7:19 pm
Location: Argentina

Re: Passive Homing Missile

Postby Xray » Thu May 16, 2013 5:37 am

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.
User avatar
Xray
 
Posts: 500
Joined: Sun Jun 17, 2012 6:12 am
Location: USA

Re: Passive Homing Missile

Postby Luezma » Sat May 18, 2013 7:53 pm

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
Luezma
 
Posts: 14
Joined: Thu Dec 13, 2012 7:19 pm
Location: Argentina

Re: Passive Homing Missile

Postby Luezma » Fri May 24, 2013 3:58 am

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)
Luezma
 
Posts: 14
Joined: Thu Dec 13, 2012 7:19 pm
Location: Argentina


Return to Scenes

Who is online

Users browsing this forum: No registered users and 4 guests