Home    LittleBigPlanet 1 - PSP - Tearaway -Run Sackboy Run    LittleBigPlanet 1    [LBP1] Tutorials [Archive]
#1

How to rotate motor bolts at precise angles

Archive: 3 posts


Intro

This tutorial explains how to make motor bolts that rotate an exact angle, like 90 degree (quarter circle) or anything you want, in a given time. You will see, that there is a small difference, whether the bolt stops after this time or not. This tutorial focuses on the first but resolves the latter as well. It aims at precision and uses no glitches or extended setups. Interest in LBP createmode is required, some experience with it and some very basic math (like 360 degree= full circle and cross-multiplication). Note that it is about LBP1, though it's core remains true for LBP2 as well, with some small adjustments and extentions, which are going to be described in this future tutorial (probably in the next days, I will link it here).

General setup

If you want a motor bolt in LBP1 to start and stop with precision, you'll use an emitted mag key, the lifetime setting is 0.1 sec or anything higher, in 0.1 steps. The corresponding mag key is of course set to on/off. A motor bolt's speed is between 0.1 and 60 (0 = off, so 600 speed values), a motorbolt at 60 with a lifetime setting (of the emitted key, I'll refer to that from now on simply as "lifetime") of 0.1 moves 120 degree. When you keep the time fixed, speed and angle are linear, so lifetime= 0.1 and speed = 18 => angle = 36 degree. I call this general setup "stop-and-go motor bolt".

Getting more difficult

Now if you set lifetime to 0.2, a motor bolt with a speed of 60 moves 300 degree and a 18-speeder moves 90 degrees, so it seems, that it's not linear in time?!? Not entirely, it's because the motor bolts stop. If you try to compare a stop-and-go motor bolt (speed= 60, lifetime= 0.1) with a continiously running motorbolt (equal speed) you'll see, that the one continiously running moves 180 degree in "the same time" as the stop-and-go moves 120 degree. Why is that? Well, there is a differenc! You can set the emitters frequency also to 0.1 seconds, then you get very short moments, when there is no key and the motor bolt stops, in contrast to a smooth, continious rotation that "naturally" goes a "little" further.

Conclusion: A motor bolt that stops after (more precisely 'in&apos one particular tenth of a second, moves only for two thirds of this decisecond. Or for two pulses, with one pulse beeing one third of 0.1 seconds.

Meaty

In essence, we have the following (easy) equation in LBP1:

angle (in degree) = speed * amount of pulses,
but applied to two situations. For a continiously running motorbolt follows:

amount of pulses = 30 * time (in tenths of seconds, and remember: Only measuring, no stopping!)
and for a stop-and-go motorbolt:

amount of pulses = 30 * time - 1 (time =lifetime).

Lifetime settings of 0.1, 0,2, 0,3, 0.4, ... translate to 2, 5, 8, 11, ... pulses. And for one pulse it's angle = speed. Easy as pie! Another way to look at it: A stop-and-go bolt is like a continious one until the last decisecond. And we see: A continious motor bolt is somewhat easier, since it's angle is linear in both speed and time. (But also more boring, since the interesting point (at least in this context) IS to stop them at some point. ;-)
Since there is a max in speed and no easy and precise way I know of to adjust lifetime on a finer scale, only certain lifetime-speed combinations are possible for a stop-and-go motorbolt to rotate a given angle. Especially, rotations in steps of factors of 360 (which I find the most appealing, like 90, 180, 45 or 72) are are only possible with the following seven lifetimes: 0.1, 0.2, 0,3, 0.7, 1.7, 2.7 and 6.7. These lifetimes translate to 2, 5, 8, 20, 50, 80 and 200 pulses. For all other lifetime settings, you'll find no matching speed setting, to rotate for a factor of 360 degree. (I wrote a small program to check, its because all other lifetimes lead to pulse numbers not even closely factoring 360.)

Note these


Those numbers only apply, when no weight issues arise. Of course, the motor bolt's strength should be at max but I still won't guarrantee anything for "very heavy" stuff. Also be carefull with "strong" external forces influencing your rotators.
Be carefull with "very low" speed settings for "very short" times. It might not move at all.
I'm still not sure if the "starting" also affects the number of active pulses. It could be that it's not "two pulses in the last decisecond" but "one pulse in the last and one the decisecond before it officially starts", like a transition on the timescale of one pulse to the left, know what I mean? Anyway, such a transition wouldn't change anything of the above, so it probably doesn't matter.
I'm very certain about those numbers, I tested it a lot. Though this text is a first draft and will probably only improve over time. Feedback is welcome! :-) Hope you enjoyed reading and learned something, that is gonna be usefull to your creations!
2011-02-08 00:23:00

Author:
Xario
Posts: 238


I cannot wait to read your LBP2 tutorial on precision motor movements! My head has been hurting reading all the information you and the other kind community members have been posting in the "Guide to Speed, Rotation and length units in LBP2" LBP2 tutorial discussion.2011-02-08 02:27:00

Author:
Unknown User


zeroscout:
Depends how many step in rotation you need. But what I found also usefull is to acutally have invisible holographic object with selector (one output for each posision you need = 4 outputs for 90 degrees movement), that is actually switching between emitors and when switched will will activate the tag, that cause the physical object dissapear and immediatelly emit another one - each output/emitor is emiting with different rotations.

I found this usefull especially if you need physical cubes rotate in the grid with another cubes. Because if you have two near collumns - there might not be a spate for rotation. (when it is rotate 45 degree, it is actually wider at the axes.) This way, you just re-emit it with another rotation and dont have to solve the space, colision or timing problems.

OF course if you need 10 degrees rotations, this one is useless. But for standart 90 degree grid solution it seems pretty efective.
2011-02-11 19:55:00

Author:
Agarwel
Posts: 207


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.