Author Topic: Side-Chase Camera Playertype [Paper-Mario-like]  (Read 3169 times)

This Third-Person-only playertype would have a camera that viewed the player in only one fixed direction.

This playertype can be found in games such as Paper Mario, here is a good example of what I mean:
http://www.youtube.com/watch?v=Ranhz7ABadk

As you can see, you never view certain aspects of the map, you only see it in one direction. The player can move in any direction without the camera changing its view of the player. Basically, if the player jumps the camera will move up. If the player moves left, right, forward, back, rotates/turns in either direction, the camera will remain in a fixed view, but the camera will still follow the player around wherever it goes.

1. Is this possible?
2. Anyone willing to do it?


I've tried to do this before and it's impossible to prevent the camera/player from rotating.

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

and...

http://forum.blockland.us/index.php?topic=225099.0
Exactly where I'm trying to head at, but as a playertype, and where you don't have to set a camera path or use the setplayercamera event. Keep in mind this would be used for huge RPGs with many areas and maps.

I've tried to do this before and it's impossible to prevent the camera/player from rotating.
Ah, I see.


Oh well...if there's any other approaches to this that are simple, please post!



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.

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.
« Last Edit: March 01, 2013, 03:16:05 PM by Space Guy »

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.

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

you can make a playertype's sideways speed 0 i think and then they won't be able to move sideways anyway.
That's easy. The problem is that the player can still turn the camera and there's no really efficient way to prevent it.


You can't make it a playertype, you have to make it a server sided add-on.

You can't make it a playertype, you have to make it a server sided add-on.
A playertype is a server-sided add-on wtf u smokin

A playertype is a server-sided add-on wtf u smokin
Crack and Marijuana.