Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Everything Else LittleBigPlanet 2
#1

Pressing on the Control Stick softly gives inverted controls.

Archive: 13 posts


Hey guys,

So, long story short, I'm trying to make a ship move in 8 directions... Up, Down, Left, Right and the diagonals. All's fine and dandy, except when I tilt the Control Stick eeever so softly. For some reason, the directions get inverted (not permanently, just while I'm doing this). This, of course, isn't the case when using the D-Pad.

I have provided a photo of the logic. R1 makes the ship move a bit slower...that's why I pointed it out on the diagram.

Diagram link (http://i52.tinypic.com/2ilezgx.jpg)

EDIT: I have also noticed that when I am pressing the Control Stick softly, the cables don't light up. Weird. Could it be a bug?
2010-10-29 06:17:00

Author:
aer0blue
Posts: 1603


First off...Dooood!
HAven't seen you in like, forever, welcome back m8!
(If you left of vourse. )

Also, that's seems pretty weird, are you sure you don't have any of the settings as inverted by accident?
I'm not really good with pics, I work better if I see the actual thing, so I'm not really sure right now what could be.

But as you pointed out, it may indeed be a bug.
2010-10-29 07:11:00

Author:
Silverleon
Posts: 6707


Hey, thanks for the welcome! I've always been around, actually. Just been a lurker. d:

Anyway, I'm sure none of them are inverted. Like I said, it only happens when I tilt the stick softly. If I press it firmly/fast all the way, it moves the direction it's supposed to. Honestly, it seems like a bug.
2010-10-29 07:42:00

Author:
aer0blue
Posts: 1603


EDIT: I have also noticed that when I am pressing the Control Stick softly, the cables don't light up. Weird. Could it be a bug?

The cables show the digital component of the signal, which doesn't switch on until you reach 75%, so that's the correct behaviour.

The analogue sticks themselves don't produce erroneous negative signals at low thresholds, so there is probably something subtle going on in the logic. What input types are you using to your movers? And is there any reason why you are inverting the output of the AND gate, rather than just inverting the R1 signal directly?


An alternative methodology would be to place the "with R1" movers in one microchip and the "without R1" movers in another microchip, and switch the chips on and off, based upon the value of R1.
2010-10-29 09:30:00

Author:
rtm223
Posts: 6497


Connect the R1 input to the NOT gates directly. I'm not sure why you're using the output from the ANDs. Read rtm223's analogue processing guide because you will see that all these are manipulating the analogue signal to give you an output - NOT using the digital signal.

I think this is what's happening...

When you press R1 and the stick is at -51%, the bottom AND gate outputs -51% (min of 51, 100). The NOT gate now outputs 49% (100-abs(-51)). The AND gate above it now has two inputs, -51% from the stick, and 49% from the NOT gate. The minimum of these is 49%, so that's what gets passed through. But wait! The sign is now POSITIVE, thanks to the NOT gate taking the absolute value when it inverts. So the mover goes the other way. (This mover should not have been moving AT ALL since you are pressing R1 to go slow!)

The issue with the digital signal not turning on is known. It needs 75% before it will turn on, and then it needs to go down to 25% before it will turn off. There may be some reason for this, or it may be a bug.
2010-10-29 09:48:00

Author:
thor
Posts: 388


First off, thanks for the input, guys! I appreciate it. :] I'm starting to understand why it happens. Just having a hard time figuring out how to make it not happen. Hah.


Connect the R1 input to the NOT gates directly. I'm not sure why you're using the output from the ANDs.

And is there any reason why you are inverting the output of the AND gate, rather than just inverting the R1 signal directly?

Whoops, seems it slipped my mind! Yeah, connecting the R1 directly to the NOT gate works just as good.


What input types are you using to your movers?

What do you mean by input types?


An alternative methodology would be to place the "with R1" movers in one microchip and the "without R1" movers in another microchip, and switch the chips on and off, based upon the value of R1.

Alright, I tried this, but I'm getting the same results. Seems turning off the microchip does no difference? Hummm...
2010-10-29 22:22:00

Author:
aer0blue
Posts: 1603


What do you mean by input types? On / Off, speed scale, strength scale.


Alright, I tried this, but I'm getting the same results. Seems turning off the microchip does no difference? Hummm...
It really should, if you disable the microchip then everything inside it stops working....
2010-10-29 22:28:00

Author:
rtm223
Posts: 6497


It really should, if you disable the microchip then everything inside it stops working....

Oh, yes, it definitely does do that. I just tested it and yes, everything within the microchip does stop working...but it still doesn't fix the inverted control issue.

Would it be better if I just publish a locked, copyable version for you guys to tinker with? Still wrapping my head around LBP2's new logic tools. Hah. >_<
2010-10-29 23:10:00

Author:
aer0blue
Posts: 1603


Would it be better if I just publish a locked, copyable version for you guys to tinker with?

Would be easier.
2010-10-30 15:42:00

Author:
Aya042
Posts: 2870


You're not crazy.

I think I know what's happening.

The analog output of the AND gate (and possibly others, I'm doing a ton of testing right now) depend on both the digital and analog inputs.

Here is how AND seems to behave from my preliminary testing:

The magnitude of AND's analog output is the minimum analog magnitude being sent to it. This has been well established.

However, the sign (direction) of the analog output is always positive unless an odd number of its digital inputs are -1, in which case it is always negative, regardless of the signs of its analog inputs. Also, its digital output is -1 if the digital inputs are +1 and -1, and it is +1 if they're the same (and not 0).

Here's a table with some examples:

Input 1 Input 2 Output
A D A D A D
45 0 18 0 18 0
59 1 73 0 59 0
-35 0 45 0 35 0
-30 0 -50 0 30 0
-40 -1 -50 0 -40 0
-80 -1 25 0 -25 0
-30 -1 -50 -1 30 1
50 1 -80 -1 -50 -1
I have submitted a bug report, as some of those results seem odd enough they may not be entirely intentional.

Edit: Extensive testing (every combination of analog and digital positive, negative and zero) has confirmed this: The sign (of any non-zero parts) of the output of an AND is the same for both analog and digital, and is positive unless there are an odd number of negative digital inputs. The sign of the analog inputs is discarded completely.

To emphasize that: The AND gate ignores the sign/direction of the analog part of the signal and decides what it should be based on the digital part of the signal.

Now to do the same tests on OR and XOR just to make sure we don't run into any other surprises...
2010-10-31 17:49:00

Author:
Balorn
Posts: 92


I notice the same doing my video, i had minimum on negated timer and as OR gate works it should send negative but it was sending positive:

http://www.youtube.com/watch?v=mIE7shi2GoQ at 8:00

...it should send negative same as OR gate works, apples the symbol of minimum inputed value same as OR gate maximum inputed value
2010-10-31 22:42:00

Author:
Shadowriver
Posts: 3991


...I think my head asplode. I can only take so much logic. O_O

Can anyone simplify what Balorn said for me? xD
2010-11-01 06:08:00

Author:
aer0blue
Posts: 1603


It means if you use an AND gate on the signal from an analog stick and don't add extra logic around it, the direction may reverse if they don't push the stick far enough.

Edit: ...And I just discovered I need to do more testing because of even more weirdness I found.
2010-11-01 07:05:00

Author:
Balorn
Posts: 92


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.