Page 1 of 1

Camera

PostPosted: Fri Apr 12, 2013 17:03
by markveidemanis
When the player is sitting or has died, the camera stays as it is. I would like the camera to change with the height of the player as it is to others so the player sees the perspective that they should see instead of the default height of the camera.

PostPosted: Fri Apr 12, 2013 18:43
by PilzAdam
Attaching the camera to the player model would be extremely laggy and wouldnt even work on all servers. The player active object is handled in the server and you cant really know if there is a model on all servers.

Also, how do you sit in the game?

PostPosted: Fri Apr 12, 2013 18:52
by markveidemanis
http://forum.minetest.net/viewtopic.php?id=3977
/sit

The camera moving works when i take damage or am in lava, its just client side.

PostPosted: Fri Apr 12, 2013 20:51
by Calinou
PilzAdam wrote:Attaching the camera to the player model would be extremely laggy and wouldnt even work on all servers. The player active object is handled in the server and you cant really know if there is a model on all servers.

Also, how do you sit in the game?


Something in Lua API could be used to change player collision radius, eye height, etc... would be useful. :D

PostPosted: Fri Apr 12, 2013 23:14
by xavier108
markveidemanis wrote:When the player is sitting or has died, the camera stays as it is. I would like the camera to change with the height of the player as it is to others so the player sees the perspective that they should see instead of the default height of the camera.

I don't think that will be a good.I think minetest will be laggy when you do that.

PostPosted: Sat Apr 13, 2013 13:53
by Traxie21
How About LUA functions to rotate, move, and repotition the camera.

PostPosted: Sat Apr 13, 2013 14:25
by markveidemanis
I have an idea:
Move the player so he sees a different perspective but do this client side so he will look normal on the server. Maybe also use the pitch/yaw to manipulate the position.

PostPosted: Sun Apr 14, 2013 00:45
by prestidigitator
I suggest looking at the Second Life API to get design ideas for functionality like this. It is a sandbox platform that is scaled extremely well for highly multi-player interactions and a strong client-server model like Minetest has. Things like setting camera positions in a specific context such that it works well between the client and server and can be automatically reverted to normal behavior have been solved there for a long time. Not everything is going to translate one-for-one by any means, but it would be a good start for checking out existing models of features like this.