Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Help!
#1

airplane analouge tilt control

Archive: 16 posts


This setup lets me change the pitch of my little airplane. Tilting it forwards or backwards. Great, but...


http://www.lbpcentral.com/forums/attachment.php?attachmentid=29982&d=1296474265


It does'nt register the analouge input at all. it just on or offs into each position. I thought the speed or strenght scale setting on the gyros would help me out, but no such luck.

Does anyone know of an efficient way of seting it up so that nudging the stick tilts the plane just a bit, and moving the stick all the way tilts my plane to the maximum pitch?

I tried the advanced rotators but i cant seem to set one to reverse the rotation or make them stop at the desired angle.

Thanks.

29982
2011-01-31 12:22:00

Author:
LaserApa
Posts: 11


Ok, i may have found another way: using a sequencer set to positional may let me switch to different angles depending on how far i push the stick.

I'll have to try it when i get home tonight, but if anyone has an more straightforward sollution i'd me much obliged.
2011-01-31 12:46:00

Author:
LaserApa
Posts: 11


I just put one together and tested it. Do this:

First, make a section that will level off the plane if the stick isn't being pressed:

Make a Sequencer, set to Positional, with a Battery filling its width but not hanging off the end.
Connect the control stick to the Sequencer's Positional input
Connect the output of the Battery on the Sequencer to a NOT gate
Connect the NOT gate's input to a Gyroscope
Tweak the Gyroscope's to control how fast/slow the plane levels back out


Next, set up a rotator to tilt the plane when the stick is being pressed:

Use an Advanced Rotator, set to Speed Scale
Connect the control stick to the Rotator's Speed Scale Input
Tweak the Rotator to control how fast you want the climb/dive to be


What this does is turn off the Gyroscope whenever the stick is pressed. The positional Sequencer is used instead of a simple NOT because the analog sticks don't produce a digital ON signal until they're pressed past 75%.

Here's a picture:
http://ie.lbp.me/img/ft/50eb17e04ec638dbe672b91d47fe9115b58c5409.jpg
2011-01-31 13:30:00

Author:
Balorn
Posts: 92


Brilliant! Much appreciated. I will try it out tonight.2011-01-31 13:34:00

Author:
LaserApa
Posts: 11


I just put one together and tested it. Do this:....

Wouldn't that let you pitch too much? I would think the rotator would be able to rotate the plane all the way and go upside down even.

Here's what I would do:
http://i7.lbp.me/img/ft/a779653d16756d149d2fb1cf37dd1e8f6aa34ad7.jpg

I've got the L/R from the thumbstick wired into the L/R of the joystick mover and a 100% battery wired into the top. This way it's as if you're always holding the thumbstick straight up (so it's similar to a gyroscope) but you can adjust the L/R which will allow +/- 45 degrees of tilt (but it's analog so you can get any amount of tilt between zero and 45 degrees). The NOT gate is wired into a zero speed rotator to keep it from over-spinning, but it turns out that's not an issue so you can leave out those parts and only use the battery and joystick rotator.

If you want to be able to tilt more than 45 degrees, you can lower the strength of the battery, but if you want to lower your max tilt, you'll need to add in an AND gate limiter to the thumbstick signal.
2011-01-31 22:23:00

Author:
Sehven
Posts: 2188


Wouldn't that let you pitch too much? I would think the rotator would be able to rotate the plane all the way and go upside down even.
Depends if you want limits on how much it tilts or if you want to be able to do loops, I suppose. I think the key is using the sequencer to turn off the "stay upright" gyroscope whenever the joystick is moved instead of just when it's pushed far enough to generate a digital 1.
2011-02-01 03:40:00

Author:
Balorn
Posts: 92


Yeah, you and I are describing circuits to accomplish two different goals, I suppose. The advantage of mine is that you can tilt to a fixed position and then keep it there by holding the stick in that spot. The disadvantage is that you're limited to 45 degrees of tilt in either direction, so I guess it comes down to what Apa is trying to do. My idea would be pretty cool for a helicopter, though 2011-02-01 06:55:00

Author:
Sehven
Posts: 2188


Wow Sehven, thats a slick sollution right there. I came up with a way to do it myself using part of balorns sollution, but it was pretty overcomplicated. The one i wrote about on the second post. It works, but this ones seems neater.

Thanks to the both of you's!
2011-02-01 08:59:00

Author:
LaserApa
Posts: 11


I tried the advanced rotators but i cant seem to set one to reverse the rotation or make them stop at the desired angle.

This is how a real plane would work, though I understand that from a gameplay perspective you wouldn't want your plane to loop; especially in a side scroller.

Have you looked into ways of locking the Gyroscope angle in place after L/R control is released? The acc/dec settings on the gyros will make for a transition and a limit to its movement, while the lock will stop it from moving; a Rotator perhaps with 100% decrease?
2011-02-01 10:55:00

Author:
Antikris
Posts: 1340


Wow Sehven, thats a slick sollution right there.

Glad you like it. I came up with it for a problem I was having (https://lbpcentral.lbp-hub.com/index.php?t=46512-Local-space-on-a-joystick-rotator&p=757403#post757403), but unfortunately it didn't actually help in my situation
2011-02-01 15:30:00

Author:
Sehven
Posts: 2188


http://www.lbpcentral.com/forums/attachment.php?attachmentid=30062&d=1296593578

This is why i'm not a programmer, i tend to overcomplicate things

30062
2011-02-01 20:56:00

Author:
LaserApa
Posts: 11


I've been working on a little plane and it's been giving me all kinds of trouble... I guess I'm not really understanding the rotators or something, because the thing always wants to flip over. I actually do want to be able to do loops and things with mine... Take off, land, stall out, all of that good stuff. I'll have to give some of the designs from this thread a try and see how it works out...2011-02-01 21:32:00

Author:
tetsujin
Posts: 187


This is why i'm not a programmer, i tend to overcomplicate things

Most of that makes sense but you've got some redundancies and a bit of overworked tech in there. First, there's no need to use the joystick rotator AND the gyros (though I guess it looks like you've unhooked the gyro microchip). You could put the gyros directly on the the sequencers so you don't need the extra chip and all the batteries on the seqs.

I'm actually tinkering with the method I described (the joystick rotator) and I'm having a lot of fun with it for a helicopter. The tilt was more than I wanted, though, so I had to use sequencers to downscale the signal from the thumbstick a bit (pretty much the same thing you did with the gyros, but with batteries hooked into an OR gate fed into the thumbstick mover). I only used like 8-9 or so batteries for each direction, though, with 5% increments from 10% to 50% on the forward and 10-35% on the back. I had to slow down the speed of the rotator a bit to smooth out the transitions (going from one increment to the next was kinda' choppy), but it looks pretty good now. For movement speed, I ran the full forward speed into an advanced mover, and coupled it with the scaled reverse speed so that the choppa can fly forward faster than backward.
2011-02-02 14:53:00

Author:
Sehven
Posts: 2188


I'd like to point to this reply from me (https://lbpcentral.lbp-hub.com/index.php?t=45423-Helicopter-aesthetic-nonsense.&p=758653#post758653) to a (similar) thread about helicopter movement. I think it would be a good idea to work with states (Selector) for an airplane as well.2011-02-02 14:58:00

Author:
Antikris
Posts: 1340


Most of that makes sense but you've got some redundancies and a bit of overworked tech in there. First, there's no need to use the joystick rotator AND the gyros (though I guess it looks like you've unhooked the gyro microchip). You could put the gyros directly on the the sequencers so you don't need the extra chip and all the batteries on the seqs.

Yeah. Thats just a comparison between my method and yours. Both chips do same thing, but mine is bigger! Bigger is better right? right?.... crickets..
2011-02-02 17:37:00

Author:
LaserApa
Posts: 11


I'd like to point to this reply from me (https://lbpcentral.lbp-hub.com/index.php?t=45423-Helicopter-aesthetic-nonsense.&p=758653#post758653) to a (similar) thread about helicopter movement. I think it would be a good idea to work with states (Selector) for an airplane as well.

Yes. i have something like that planned. Thanks.
2011-02-02 17:39:00

Author:
LaserApa
Posts: 11


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.