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

Rotating a set amount of degrees

Archive: 3 posts


I was wondering if there was a way to use one of the new rotators to rotate an object a certain amount of degrees then a button is pressed. Anyone have this magical knowledge?

Also, while I have your attention, I would like to move an object be a specific amount every time I press a specific button on the controllinator. Any way to do this? Thanks in advance.
2011-01-22 23:54:00

Author:
Unknown User


for the rotating, use gyroscopes. just rotate it to the correct angle, and connect it to your button. cant help you with the other one, sorry2012-01-31 16:35:00

Author:
Unknown User


The movement issue is one of "move an object at a certain speed for a certain amount of time". Lookup Grid Movement tutorials for that in the Tutorials forum.

Same goes for the rotation. You can indeed use several gyroscopes that you cycle through with a selector, but it is also possible to feed a rotator a signal for a set amount of time on a button press. Set the rotator to 100% acc/dec. Its speed is expressed in degrees per second; so speed 360 means one full rotation in one second. You can have it activated for a while using a timer (set to count down), set to for instance 0.5 seconds; this will cause a 360 speed rotator to turn 180 degrees during 0.5 second.

Timers may not be entirely accurate, though I hope they are, but keep an eye on it. You also may want to prevent the player to hit the button a second time during the rotation: this would re-trigger the timer and mess up the rotation. To prevent this, place a 1-shot counter in front of the timer, fed by the button. Wire the output of the timer to a NOT gate and wire that to the reset of the counter.

Another uncertainty in all of this is mass; if you are turning a large object then it will take 'a while' to start moving and quit moving which may jeopardize precision. If you use multiple rotators at once, though, you can stack their strength and the object will start/end (more) instantly.
2012-01-31 17:26:00

Author:
Antikris
Posts: 1340


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.