Page 1 of 1

New controller

Posted: Sun Nov 29, 2020 7:02 am
by yagaodirac
I work on a mod recently. I need to make a new kind of controller. When player press wasd, the character should move around in the scene, but I want the viewport to stay. When player presses some key, say spacebar, the viewport aligns with the character. With the api available now, I have to combine a character entity with a god mod controller in code.
This kind of controller benefits some specific mode. It works way better when player needs to dodge any moving object.

Re: New controller

Posted: Sun Nov 29, 2020 8:20 am
by ssilk
moved from suggestions to modding requests— ssilk

Re: New controller

Posted: Mon Nov 30, 2020 5:59 am
by yagaodirac
ssilk wrote:
Sun Nov 29, 2020 8:20 am
moved from suggestions to modding requests— ssilk
Thanks. If this feature finally added, it would probably help with the bullet-hell-game mode for the modders.

Re: New controller

Posted: Tue Dec 01, 2020 12:52 am
by eradicator
In the mean time you could also try using a full-screen camera gui element with the default controller.

Re: New controller

Posted: Tue Dec 01, 2020 2:15 am
by yagaodirac
eradicator wrote:
Tue Dec 01, 2020 12:52 am
In the mean time you could also try using a full-screen camera gui element with the default controller.
But, in this way, it is possible to keep more ui as what we see in general cases?
My plan is that a god mod controller, a separated character entity, and they work together via lua. But I need one more short cut to move the view port. Which might occupy one short cut for items, and I have to code for it.

Re: New controller

Posted: Tue Dec 01, 2020 1:30 pm
by eradicator
yagaodirac wrote:
Tue Dec 01, 2020 2:15 am
But, in this way, it is possible to keep more ui as what we see in general cases?
Overlapping guis are always difficult. Making the cam not full-screen but a bit smaller might work.
yagaodirac wrote:
Sun Nov 29, 2020 7:02 am
I have to combine a character entity with a god mod controller in code.
It's just that from my experience using LuaEntity.walking_state doesn't really work in multiplayer due to lag hiding mechanisms - if you are indeed using walking_state.

Re: New controller

Posted: Wed Dec 02, 2020 2:51 am
by yagaodirac
eradicator wrote:
Tue Dec 01, 2020 1:30 pm
yagaodirac wrote:
Tue Dec 01, 2020 2:15 am
But, in this way, it is possible to keep more ui as what we see in general cases?
Overlapping guis are always difficult. Making the cam not full-screen but a bit smaller might work.
yagaodirac wrote:
Sun Nov 29, 2020 7:02 am
I have to combine a character entity with a god mod controller in code.
It's just that from my experience using LuaEntity.walking_state doesn't really work in multiplayer due to lag hiding mechanisms - if you are indeed using walking_state.
Thanks. I didn't start with this part yet. I'm gonna try it out. Actually I don't mean to make something look like factorio, maybe I would do entity.teleport or something without animation in order to make multiple looks for players to choose from. Don't know if that works well.