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

Can't get objects to rotate upon impact!

Archive: 4 posts


Hello, this is my first post here! ^^ I was hoping someone could help me with making an object function the way I want it to in edit mode! Before anyone tries to guess, I'm attempting to make a Metroid-esque level, and I'm trying to create "objects" that essentially act, behave and visually resemble the actual enemies from the Metroid universe as closely as possible.

So, here's what I need help with: The object I'm making is going to act and behave like the enemy called "Viola" / "Multiviola." I'm having a lot of difficulty making the object bounce off of walls the way I want it to! To see its behavior, you can watch this YouTube video: http://www.youtube.com/watch?v=EMz9noXASiQ and the Viola enemy appears at 3:44 . And here is an image I made to give a rough example of what I've been trying to get it to do:

http://i32.photobucket.com/albums/d19/Kyoumi/multiviola.png

I'm not sure if there is a way to get this to work based on this image, but it's the most logical idea I can come up with. Basically, I just simply made a round ball, and attached 2 more pieces onto it (the blue parts). Once the object is moving, if one of the blue parts impacts the wall, it turns clockwise 90 degrees, and vice-versa... this would make it work nearly flawlessly, unless I'm missing something.

If you guys have any ideas, please let me know!! =3 I can't seem to get this to work the way I want!!
2011-06-13 21:54:00

Author:
Nikori
Posts: 1


I spent forever trying to make a game work like this, never figured it out right. There are way to many issues with making a ball bounce uniformly at a constant speed in a given direction. Sorry I can't help at all but good luck!2011-06-13 22:01:00

Author:
Jayhawk_er
Posts: 403


I assume you have a mover or an advanced mover which is moving your object. The problem with that is when you rotate the object, the object keeps moving in the same direction. To fix this...

1. Make a rectangular piece of clear holo and glue it to your ball so that it looks like a lollipop.
2. Place a tag at the end of your lollipop stick.
3. Place a follower on the ball which follows the tag at the end of the lollipop stick and tweak it to your desired speed settings.

Now when you rotate the ball it will also rotate the lollipop stick with the tag...causing your ball to move in a new direction.

You may even want to have four lollipop sticks...each sticking out at a 90 degree angle from the ball and add some logic in there which chooses which one to follow(e.g. Following 0 degree stick, left side of ball hits wall, starts following +90 degree stick).

Hopefully this helps you find a solution to your problem.
2011-06-13 22:50:00

Author:
anthman852
Posts: 66


The way I'd do it would be to have a basic mover on the object so it will always move in a straight line (the setup I guess you already have?) Then have 4 gyros on your object in the four directions (up, down, left and right) placed so that your object is moving along a diagonal when any one of the gyros is active. Hook each gyro to a different output of a 4 way selector (in sequence, port 1 the 'up' gyro, port 2 the 'right' gyro, port 3 the 'down' gyro and port 4 the 'left' gyro. Now put an impact sensor on each impact site and connect them to a directional combiner, counter clockwise to the positive and clockwise to the negative (as labelled in your diagram). Connect the output of the combiner to the cycle input of the selector and voila, dependent on the impact the selector will move either one up or one down and turn on the corresponding gyro.2011-06-14 00:59:00

Author:
Xaif
Posts: 365


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.