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

Recording an Object's Velocity - SOLVED

Archive: 5 posts


I've been trying to record the velocity of a moving object, so that I may "freeze" that object in the air, then "unfreeze" it and have it continue moving as if it were never stopped. I've worked out a basic system that involves tracking the object's position at two points, then tracking the time it takes to travel between these two points, but I'm not sure I can get a worthwhile number out of this system without being able to track the components of the object's velocity. Is this a feasible goal within LittleBigPlanet 2, or am I reaching too high? If it is feasible, is there any immediately apparent methods of accomplishing it? Thank you in advance for your help.2011-02-21 01:37:00

Author:
MrLongJohn
Posts: 36


I need more information about this object. Does it have a fixed speed? Does it follow a straight line?

If the answer to both questions is "no," then you could just move the object with a mover, and enable/disable it to freeze/unfreeze the object.

If not, you may need to simplify your object's movement.

MM really needs to add a movement sensor.
2011-02-21 01:52:00

Author:
Unknown User


Thanks for the reply I Give Up75. The object does not have a fixed speed, and it doesn't follow a straight line. Specifically, the object needs to be emitted from a creatinator. I spent about an hour working on a system exactly like the one you described, but I had several conflicts that made the system very convoluted.

My first problem was that the mover created realistic, parabolic paths only when pointing directly left or right. If it were pointed in any other direction, a component of the mover would be in the vertical direction, and it would not react to gravity accurately. This was a result of the local coordinate system of the mover, which was necessary to have the initial velocity vector point in the direction that the creatinator was pointed.

My second problem was that the object would move erratically when it collided with anything. I tried lowering the friction on the object (which is a ball) to zero, but it would still get tilted when it hit certain objects. Likewise, I experimented with gyroscopes, but these also produced unnatural flight paths. I can't prevent the object from colliding with other emitted versions of itself, so this is a significant problem.

Since the problems were so irreconcilable, I opted for the "velocity tracker" system mentioned above, but I'm worried it's a bit too intricate for LBP2.
2011-02-21 02:28:00

Author:
MrLongJohn
Posts: 36


Could you use a timer or counter to control your movement speed?

What I mean is this, if you have a mover set to speed scale, and attach a counter to it, how full the counter is determines the speed.

Now, if you run the counter into an AND gate, and have a toggle connected to the other input of the AND, you can stop and restart the movement by flipping the toggle switch on and off.

also check out this thread https://lbpcentral.lbp-hub.com/index.php?t=48824-LOGIC-TOOLS-Speed-Sensor-Signal-Change-Sensor
2011-02-21 02:49:00

Author:
tdarb
Posts: 689


Thanks for the reply tdarb. I am intrigued by the method mentioned by waD_Delma and rtm223 in the forum link you provided; it's not instantly apparent to me exactly what the logistics of this method will be, but it seems like it might work. At any rate, I will give that a try tomorrow and see if it fits my needs. Thanks again!

Okay, so I've got a bit of a follow-up question; is it possible to restrict an object's vertical or horizontal movement, but not both?

EDIT: Nevermind, the solution relies on followers; I'll post the details of my solution soon, in case anyone else has this problem.
2011-02-21 05:14:00

Author:
MrLongJohn
Posts: 36


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.