[Solved] Inverted laser control
9 posts • Page 1 of 1
[Solved] Inverted laser control
I'm working on a little project, and I have a problem. I need to make a turret for a tank turn in the opposite direction of the tank whent he tank turns (to create a gyro stabilization like thing), but I want it to stop when I push the keys to turn the turret. The file below is what I'm currently working on.
The problem I have in doing so, is that I would need two lasers to have inverted controls. That is, they would be active as long as I'm not holding a certain key down (in this case the keys to turn the turret). Halpz?
The problem I have in doing so, is that I would need two lasers to have inverted controls. That is, they would be active as long as I'm not holding a certain key down (in this case the keys to turn the turret). Halpz?
Last edited by NilsMolinder on Sun Apr 08, 2012 12:06 am, edited 1 time in total.
- NilsMolinder
- Posts: 36
- Joined: Fri Jun 17, 2011 11:48 pm
Re: Inverted laser control
Make the hinge from the turret to the tank have no controls, nothing, just a hinge. Then put a +inf inertia mult circle, over the turret/tank hinge and create a hinge that attaches the circle to the turret, not the tank. This way the turret can be moved independent of the tank and the tanks movements won't affect the turret.
-

Nxdt - Posts: 1019
- Joined: Mon Aug 31, 2009 6:32 pm
- Location: Scotland!
Re: Inverted laser control
Ah yes, Brilliant!
Thank you very much for the help! I shall try this at once!
Is there any way to make the circle attach to the tank for turning the turret though?
EDIT: also, as expected, it worked.
Thank you very much for the help! I shall try this at once!
Is there any way to make the circle attach to the tank for turning the turret though?
EDIT: also, as expected, it worked.
Last edited by NilsMolinder on Sat Apr 07, 2012 11:00 pm, edited 1 time in total.
- NilsMolinder
- Posts: 36
- Joined: Fri Jun 17, 2011 11:48 pm
Re: Inverted laser control
You can do it via differentials and gears, but it will get complex quickly, and you need to simulate actual tracks. (I've done this with lego before.) Look up south pointing chariot, it always points south no matter how you turn it. Perfect for stabilizing a turret, you then just need to use another diff to control the turret.
http://en.wikipedia.org/wiki/South-pointing_chariot
http://en.wikipedia.org/wiki/South-pointing_chariot
-

Nxdt - Posts: 1019
- Joined: Mon Aug 31, 2009 6:32 pm
- Location: Scotland!
Re: Inverted laser control
Ah, I guess I'll just be happy like this then. So there's no way of making laser controls inverted? That is, active until I psuh buttan, then reactivate once I release the key?
- NilsMolinder
- Posts: 36
- Joined: Fri Jun 17, 2011 11:48 pm
Re: Inverted laser control
You can do it easily as well. Just rig a laser to be always on, then have a mechanical "Slot" that allows the laser to pass through when straight, but as soon as a key is pressed it rotates and blocks the beam. Use springs to re-center it.
-

Nxdt - Posts: 1019
- Joined: Mon Aug 31, 2009 6:32 pm
- Location: Scotland!
Re: Inverted laser control
Ah, I thought about that, but I was hoping to not have to do it that way, since it's a bit slower and less reliable than lasers. For some reason hinges have been acting funny since I updated Algodoo, jumping around and such.
- NilsMolinder
- Posts: 36
- Joined: Fri Jun 17, 2011 11:48 pm
Re: Inverted laser control
You can set legacy mode to "0" in the scripting menu, this makes them use the old algorithm.
-

Nxdt - Posts: 1019
- Joined: Mon Aug 31, 2009 6:32 pm
- Location: Scotland!
Re: Inverted laser control
Ah, OK. Well, thanks for all the help, I guess I'll just have to play around with springs and hinges for my lasers.
- NilsMolinder
- Posts: 36
- Joined: Fri Jun 17, 2011 11:48 pm
9 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest




