Home LittleBigPlanet 2 - 3 - Vita - Karting LittleBigPlanet 2 [LBP2] Help!
#1
Adding mover inputs
Archive: 4 posts
Picture in my game, an FPS, left stick moves your ship (or display) around the screen and right stick moves the cursor within boundaries of the display. Right now the cursor follows the movement of the ship unless there is input on the right stick which overrides and moves the cursor independent of the display. The display moves at max speed 15 while the cursor moves at 40. The only problem I have is when say you move the display hard right and move the cursor just slightly right the cursor appears to move left since it is no longer following the left stick but the right stick which is outputting less that 15 speed. I figure If I could add the signal from the left stick to the signal from the right stick it would solve all problems but I have no idea how to attempt this. I tried using a simple signal combiner to add the inputs but that didn't work. Can anyone point me in the right direction? I've looked at a few addition tutorials but can't seem to wrap my head around it. I just want to combine the signal from both joysticks as simply as possible. Can anyone point me in the right direction? Thanks. | 2011-10-02 20:36:00 Author: Death_with_an_H Posts: 72 |
You move your field of vision with the left stick and control a cursor with the right stick, but you don't want the cursor to move relative to your field of vision? Is that the idea? | 2011-10-02 21:02:00 Author: Ayneh Posts: 2454 |
I think so. For example if the ship controlled by the left stick is traveling right at a speed of 15, and you push the right stick to the right a tiny bit (lets say 10% of max speed 40 = 4) I want the cursor to travel at speed 19(15+4) rather than speed 4 which is equal to negative 11 relative to the ship so the cursor appears to move left even though you are pushing slightly to the right. Make any sense? | 2011-10-02 22:50:00 Author: Death_with_an_H Posts: 72 |
to do analog addition there is a trick since you are really only able to do subtraction with direction combiners. It will only work at up to 100% without doing some overflow processing. I'm gonna describe what to do, and why it works. Let's say you have values at 35% and 10%. 35+10=45 Not gates basically do a 100-signal operation on analog signals, so run the first value through a NOT gate 100-35=65 Run that into the positive pole of a direction combiner, and plug the second value into the negative pole 65-10=55 Put that through another NOT gate 100-55=45 If you want to handle values over 100, you will need to split the combiner total into a positive and negative signal before the second NOT gate. Anything on the positive side is handled just like normal since it is still within range. If you get a signal on the negative side, that means your total has exceeded 100, and more processing is needed. EDIT-for more detailed info check rtm's logic blog on analog addition (http://www.lbpcentral.com/forums/entry.php?2107-Analogue-Logic-2-Sorting-amp-Addition) | 2011-10-02 23:38:00 Author: tdarb Posts: 689 |
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.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.