Modify View Camera ?

User avatar
Chiantos
Member
 
Posts: 111
Joined: Sun Jan 15, 2017 09:04
Location: Earth
GitHub: MrChiantos
IRC: mrchiantos
In-game: mrchiantos

Modify View Camera ?

by Chiantos » Fri Aug 10, 2018 15:38

Hello,

Actually we can modify view camera with F7 or android button View.

I have Search in documentation, i have find for modify position in view : set_eye_offset

Problem ? Work for move position caméra, not for modify to 1st View to 3nd View front.

Can i use a function for use with a command the View ? I Search for character_creator , for move forward 3nd View front for open editor skin, and when i touch button ok or cancel, the player move to First View.

Possible ?
Game : BlockColor - Avatar Mod with Cms : SkinKey
 

User avatar
Krock
Developer
 
Posts: 4044
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
GitHub: SmallJoker

Re: Modify View Camera ?

by Krock » Fri Aug 10, 2018 15:58

Currently you can't change the perspective by a mod. The eye offset function is also rather unusable.
Mod Search Engine - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

User avatar
Chiantos
Member
 
Posts: 111
Joined: Sun Jan 15, 2017 09:04
Location: Earth
GitHub: MrChiantos
IRC: mrchiantos
In-game: mrchiantos

Re: Modify View Camera ?

by Chiantos » Fri Aug 10, 2018 16:31

Krock wrote:Currently you can't change the perspective by a mod. The eye offset function is also rather unusable.


Can i Add this on bulletin , modify lua ? Or only c++ ?
Game : BlockColor - Avatar Mod with Cms : SkinKey
 

User avatar
Krock
Developer
 
Posts: 4044
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
GitHub: SmallJoker

Re: Modify View Camera ?

by Krock » Fri Aug 10, 2018 16:56

@Chiantos: You'd have to modify the C++ source code. Here are some hints if you really want to implement it:
1) Add a new Lua API function which can be used by mods: https://github.com/minetest/minetest/bl ... t.cpp#L582 (insert roughly here)
2) Send a new packet (see clientpackethandler.cpp) in server.cpp to notify the client about the camera change
3) Receive the packet & handle it in clientpackethandler.cpp and call Camera::setCameraMode to apply the new mode
4) Document everything
Mod Search Engine - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

User avatar
Chiantos
Member
 
Posts: 111
Joined: Sun Jan 15, 2017 09:04
Location: Earth
GitHub: MrChiantos
IRC: mrchiantos
In-game: mrchiantos

Re: Modify View Camera ?

by Chiantos » Fri Aug 10, 2018 17:29

Krock wrote:@Chiantos: You'd have to modify the C++ source code. Here are some hints if you really want to implement it:
1) Add a new Lua API function which can be used by mods: https://github.com/minetest/minetest/bl ... t.cpp#L582 (insert roughly here)
2) Send a new packet (see clientpackethandler.cpp) in server.cpp to notify the client about the camera change
3) Receive the packet & handle it in clientpackethandler.cpp and call Camera::setCameraMode to apply the new mode
4) Document everything


Thank you
Game : BlockColor - Avatar Mod with Cms : SkinKey
 


Return to Modding Discussion



Who is online

Users browsing this forum: No registered users and 0 guests