Blockland Forums > Suggestions & Requests

Side-Chase Camera Playertype [Paper-Mario-like]

Pages: << < (2/3) > >>

darkhog:


--- Quote from: Furling² on February 28, 2013, 10:10:44 PM ---read space guy's post.
http://forum.blockland.us/index.php?topic=80742.msg1406272#msg1406272
http://forum.blockland.us/index.php?topic=77128.msg1323289#msg1323289
http://forum.blockland.us/index.php?topic=75774.msg1292532#msg1292532

--- End quote ---

If it can be done like that
\
--- Quote from: Furling² on February 28, 2013, 09:18:13 PM ---http://forum.blockland.us/index.php?topic=225186.0

and...

http://forum.blockland.us/index.php?topic=225099.0

--- End quote ---
Then it can certainly be done as playertype too. You just need to copy some parts from camera path/setplayercamera mods and mix & match it until it works.

Greek2me:

No, it cannot be done like that. Bricks and players are totally different.

Also, in those posts of Space Guy's that you linked, he said it was a very hacky method and should not be made. Basically what it did was go through a loop every couple milliseconds and move every player's camera next to them, causing tons of lag.

Space Guy:

Since I attempted it ages ago a couple more things have been added to cameras which might be helpful. Since basically nobody else has tried since I decided my old method didn't work, I'll say what I found in about 10min testing just now.

I maintain that the best way to do this would be the equivalent of the Smash TV player. Basically, playertypes have both a cameraVerticalOffset and cameraHorizontalOffset which work as intended, but only one cameraTilt which is vertical. The top-down player can use this to look downwards but there's no similar control for a 2D platformer side angle.

Using a camera's setOrbitMode on a player puts it at a variable distance away from you. (this is the spy camera)
Cameras can now control players e.g. the brick camera events. If in control of an orbit camera, and the camera controls you, the camera stays at whatever angle it was initially and you can move around. So you can at least have a view from the side, this still has 3D control though.
The view correctly adjusts to walls in its way. Since you're not directly controlling the player it shows your name tag.

In terms of automating this (put all players into platformer mode at the start), setOrbitMode appears to obey the minimum/maximum distance settings but whatever transform I set is ignored. The camera always appears on the north/south axis (-y of player) and is directly level with your body instead of from above like default third person.

For a Paper Mario-style view, that's all you need.

For a fixed 2D plane you need some way to stop players from turning or moving sideways, which is still difficult. Setting sideways move speed to zero partially works but holding W+A/D lets you move diagonally, not good. Uncertain how to stop them turning. For it to work well this has to avoid the "put players back in place/set rotation" schedule loop as that just causes lag, looks bad and probably fails if you turn/shoot etc. quickly.

The good news is that putting this together gets a view from the side that doesn't crash when you jump in water, so it's an improvement from my old one.

darkhog:

Moving sideways can be stopped with invisible walls (rendering turned off by wrench). You just need place 2 of them, on each side of platform and you good to go. No idea how to stop them turning either though.

Megaguy2:

you can make a playertype's sideways speed 0 i think and then they won't be able to move sideways anyway.

Pages: << < (2/3) > >>

Go to full version