Home LittleBigPlanet 2 - 3 - Vita - Karting LittleBigPlanet 2 [LBP2] Help!
#1
Reversing light in relation to rotation?
Archive: 4 posts
I have a top down UFO object that moves with the left stick, and turns around with the right. I want a reverse light to only come on if you are moving the opposite way to the way the ship is facing/pointing. How do I acheive this? Thanks. | 2011-01-28 19:55:00 Author: midnight_heist Posts: 2513 |
Bolt on a piece of invisible hologram with a rocket rotator and a Direction tag on it, and put a Direction tag sensor with a small range on the back of the vehicle. When you move backwards, the rocket rotator will point the hologram towards the back and the tag sensor will trigger. There might be prettier solutions, but this one sprang to mind. | 2011-01-28 20:01:00 Author: Rogar Posts: 2284 |
Bolt on a piece of invisible hologram with a rocket rotator and a Direction tag on it, and put a Direction tag sensor with a small range on the back of the vehicle. When you move backwards, the rocket rotator will point the hologram towards the back and the tag sensor will trigger. There might be prettier solutions, but this one sprang to mind. Yup, that worked pretty darn well. One prettier solution (visual wise), would be to make a duplicate UFO off screen, just for the reverse light logic, so you can pretty up the real one. But I am curious if there is an alternative way to microchip the logic.. | 2011-01-28 20:32:00 Author: midnight_heist Posts: 2513 |
Alright then, the microchip solution: Use direction splitters to split up the signals from the left and right sticks. Then compare the signals from the left stick with the opposite signals from the right stick; if they match, the facing is approximately opposite of the direction, and thus you're moving backwards. You'll have to build in some memory to retain the last facing after letting go of the right stick. I can't say if this will work 100%, the last input from the right stick might not always reflect the actual facing of the UFO. | 2011-01-28 20:41:00 Author: Rogar Posts: 2284 |
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.