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

Continuous Speed with a moving object

Archive: 7 posts


Hey I'm making a breakout level, and I'm having trouble keeping the ball moving at a continuous speed. After it bounces around for a while, it slows down really gradually to the point that it's almost not moving at all.

Is there a way to maintain the same speed for the ball's lifetime? Is it just some gravity thing I'm not noticing? Any help would be appreciated
2011-02-09 23:53:00

Author:
Jayhawk_er
Posts: 403


0% gravity + 0% friction does not make the ball go infinitely, unfortunately.

I've been working on a simple way to make the ball bounce around forever, but I haven't gotten a glitch free version yet, so if I solve it, you'll be the first to know.
2011-02-10 00:01:00

Author:
Yofig
Posts: 288


Here's a suggestion. Put a thin layer on top of the paddle connected to it with a piston that is activated by an impact sensor. Set the piston flipper function to on. The min distance to 0.1 and the max to 0.2. Then set the timing to some thing small. The ball will get a little boost each time it hits the paddle. It won't quite be continuous but it might work for ya.

Not too sure how well it'll work without being able to test it myself. I won't be online til later or tomorrow.
2011-02-10 00:42:00

Author:
Chicago51
Posts: 258


Hey thanks for the suggestions, I've actually found a semi-effective way that I think might cut it for.

When I increased the global gravity to approx. 250% put the bounce of all the walls and blocks to about 50% and the bumper to 75% and the ball to 100%, it keeps a nice steady speed and will sometimes get a slight boost from the bumper as well. The emitter also gives a nice starting speed.

If anyone finds a better way I'd love to hear it though
2011-02-10 02:37:00

Author:
Jayhawk_er
Posts: 403


Hey I'm making a breakout level, and I'm having trouble keeping the ball moving at a continuous speed. After it bounces around for a while, it slows down really gradually to the point that it's almost not moving at all.

Objects slow down over time due to skin friction, with the exception of hologram.

However, it probably doesn't matter since whatever material you choose, you'd probably have to do all the bouncing velocity logic yourself (probably using an Advanced Mover to flip the sign of each input whenever it hits a wall). If you set the Input Action to Speed Scale, then as long as the amplitude of each signal remains constant, so will the velocity.

I considered doing something like this for my Spacewar! level, so you bounce off the walls rather than dying, but I found using Advanced Movers incompatible with combining multiple force vectors, and the only other solution I could think of was to build a physics engine in the game itself, which sounded like too much effort.
2011-02-10 10:53:00

Author:
Aya042
Posts: 2870


the only other solution I could think of was to build a physics engine in the game itself, which sounded like too much effort.

Must have had too much latency.

Flip advanced mover direction on impact, tweak strength, speed and gravity until it lets it bounce.
Or try a follower set to flee
2011-02-10 11:01:00

Author:
Bremnen
Posts: 1800


However, it probably doesn't matter since whatever material you choose, you'd probably have to do all the bouncing velocity logic yourself (probably using an Advanced Mover to flip the sign of each input whenever it hits a wall). If you set the Input Action to Speed Scale, then as long as the amplitude of each signal remains constant, so will the velocity.

I considered doing something like this for my Spacewar! level, so you bounce off the walls rather than dying, but I found using Advanced Movers incompatible with combining multiple force vectors, and the only other solution I could think of was to build a physics engine in the game itself, which sounded like too much effort.

Aagh! Too many big words I haven't really put too much effort into the ball logic yet like that, thanks for some pointers though Bremnen and Aya.
2011-02-10 22:34:00

Author:
Jayhawk_er
Posts: 403


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.