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

Making a thing pivot around sackboy.

Archive: 6 posts


Hmmmmmm... I can't explain it but...

I want to make a "rotate the level" type game, but I want the lvl to pivot around where Sackboy is standing, and not just a fixed point. I hope this was easy to understand.
2015-12-21 16:15:00

Author:
CamostarAtIsabella
Posts: 188


Does Sackboy's position stay the same as the camera rotates or does the camera stay the same while Sackboy rotates?2015-12-21 16:25:00

Author:
Vervesack
Posts: 74


https://lbp.me/v/qxpqb-7/trailer?p=1&l=12

This is supposedly a rotating 3D camera.

Here is where you get it.

https://lbp.me/v/qwzp06x/trailer?p=1&l=12
2015-12-22 00:31:00

Author:
one-mad-bunny
Posts: 334


https://lbp.me/v/qxpqb-7/trailer?p=1&l=12

This is supposedly a rotating 3D camera.

Here is where you get it.

https://lbp.me/v/qwzp06x/trailer?p=1&l=12

i could be wrong, but i don't think he is trying to make a 3d cam level, but to simply have the level rotate around the player without the player being thrown around in the process
2015-12-22 12:31:00

Author:
evret
Posts: 612


i could be wrong, but i don't think he is trying to make a 3d cam level, but to simply have the level rotate around the player without the player being thrown around in the process

That's correct!
2015-12-23 03:37:00

Author:
CamostarAtIsabella
Posts: 188


So from what I gather, you're wanting to rotate the level normally, but calculate the movement of the level as if sackboy were the pivot to give an illusion of pivoting? Either that or put a bunch of rotators everywhere! The calculation is pretty simple though if my logic isn't affected by my tiredness. If you have a rectangle with width of 2x and height of 2y and assuming left and down is negative, the center is at (x-y, x+y) at 90 degrees. At 180, the center is at (2x, 2y). At 270, you have the center at (x-y, x+y). At 360, it's back to normal. There's two problems with this. A) The formula isn't consistent it seems (it might be and probably is, but my tired mind doesn't see it) and B) This is assuming sackboy is still.
A is solved pretty easily by handling the two parts separately, then negating it. B is a bit more complex. The x's and the y's move as sackboy moves. One (tedious) way to deal with this is to put tags all around the border of your "rectangle" (level boundaries) and have one moving tag sensor for the x and one for the y which will be the scalar for the math. Then you have to worry about the level running into the level borders (which can be solved with emitting) but this is too complex for me to make and show you, but there might be (and probably is) an easier way.
2015-12-25 09:41:00

Author:
koltonaugust
Posts: 1382


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.