Jump to content

[1.2.2] Through The Eyes Of A Kerbal (1st person EVA) continued [1.1.1] (Apr 1, 2017)


Ser

Recommended Posts

1 minute ago, Ser said:

Thanks for the bug report. I don't use the forceIVA option so wasn't aware of them. I've reproduced all those issues except for the one when a kerbal on EVA can't interact with parts from 1st person view. I've tried to attach a goo container to a pod and the kerbal successfully activated right click menu and interacted with it if standed close enough, with ticks enabled. So please provide more details and exact reproduction steps.

I want to apologize, the inability to interact with stuff in first-person EVA mode was a false alarm, I just wasn't used to the FOV so I was too far to be able to interact. As for other bugs, thanks for taking your time to check them. This mod is truly a gem and hopefully you'll find some time for it to fix these bugs. Thanks again!

Link to comment
Share on other sites

Version 1.1.1 is out

Available on Spacedock

Changelog:

* Added a "Recover vessel" key for forceIVA mode ([Alt]-[R] by default);
* "Go EVA" key ([C] by default) should be now pressed with modifier ([Alt]) to avoid accidental ejections with "Camera Mode" key;
* Added 1st person view mouse sensitivity scaling to screen resolution;

* Fixed camera issues after exitting Map view or pressing "Camera Mode" key in 1st person with forceEVA enabled;
* Fixed issues when loading as a kerbal on EVA with forceEVA enabled;
* Fixed switching between crew members with forceIVA enabled;
* Fixed various camera bugs after revert/quickload;

Also some code refactoring has been made as a step in preparation of walking/running wobble fix.

Link to comment
Share on other sites

  • 2 weeks later...

I love this mod. I have the itch to play an IVA-only game, so I've been working on this to make "kerbal mode" as close as possible to regular IVA.

So far I have managed to implement in haxed form:

-Kerbal IVA movement is independent of the external "camera"

-Navball is oriented to the kerbal's body

-Kerbal has basic SAS stabilization

-Control the kerbal by qweasd for rotation and ijklhn for translation just like a normal ship (respects changed keybindings of course)

 

So far the code quality is much closer to "tech demo" than "release plugin" but it is getting there :)

BTW, Ser, do you know what is causing the glitching while walking? I'd be interested to know.

 

Here is a demo video :D

The video shows normal EVA behavior when in "third person mode", then qweasd-ijklhn and SAS operational in "first person mode". Note that when toggling out of first person, the SAS stops functioning...because I wanted it to be identical to stock behavior in that view.

 

Edited by Virindi
Link to comment
Share on other sites

I am also making the throttle function in first person mode, but act as a thruster pack power adjustment.

Now the biggest issue is the glitchy walking on planets... :(

 

Edit: BTW, free control is cool flying on the Mun's surface, too. You can hover facing downwards, for instance, like superman. You get a great view of the terrain. :D

Sorry about the spin. I was trying to demonstrate how the pack SAS can stop spins when the stock kerbaleva pid fails. And yes it still only has access to the same applied force. The stock orientation controller seems to be a little glitchy...

Edited by Virindi
Link to comment
Share on other sites

19 hours ago, theonegalen said:

Combined with player headtracking for the looking around inside the helmet, that is going to be so dang immersive.

That could be implemented I think. KSP has some API stuff related to TrackIR. Just need to find out how to use it properly.

18 hours ago, Probus said:

Does anyone know if this mod is compatible with VR headsets?  Is it even a possibility?

In the current state it doesn't support VR. Does the stock game support it somehow?

On 11.04.2017 at 2:25 PM, Virindi said:

I love this mod. I have the itch to play an IVA-only game, so I've been working on this to make "kerbal mode" as close as possible to regular IVA.

So far I have managed to implement in haxed form:

-Kerbal IVA movement is independent of the external "camera"

-Navball is oriented to the kerbal's body

-Kerbal has basic SAS stabilization

-Control the kerbal by qweasd for rotation and ijklhn for translation just like a normal ship (respects changed keybindings of course)

I like the working navball and ability to rotate in 3 axis. I was planning to implement that myself. How is rotation implemented? Does it use engines or some "reaction wheel" magic?

What I don't like is SAS on EVA. Not to mention it is a totally unrealistic concept in stock vessels and that gets worse in EVA. So I think SAS feature is at least excessive.

On 11.04.2017 at 2:25 PM, Virindi said:

BTW, Ser, do you know what is causing the glitching while walking? I'd be interested to know.

In first person mode the camera is fixed to the kerbal's transform with stock camera update logic disabled because regular FREE and CHASE modes don't do well for the first person (they fix the camera relative to the horizon). By another stock logic EVA kerbal is always rotated to the direction of the camera while walking and that causes the kerbal to zigzag as walking animation is played and the transform moves from side to side together with the camera. To avoid that "drunken kerbal" effect I had to make camera return to the initial heading every frame and that causes glitching. The only thought I have for now on how to get rid of it is to allow stock CHASE cam logic for walking only but that would require two separate ways of camera handling and has a great bug potential. More elegant and flexible solution would be to find a way to acquire control over kerbal's rotation to camera's heading.

Edited by Ser
Link to comment
Share on other sites

6 hours ago, Ser said:

More elegant and flexible solution would be to find a way to acquire control over kerbal's rotation to camera's heading.

Yes, that is my current approach. I have been working on walking today...I overwrote the EVA FSM so that I could set the reference frame myself to match the kerbal's orientation. Replacing the FSM states with my own states allows me to inject code between the movement calculation and the jetpack forces being applied. For walking, I have to get BEFORE the movement calculation so I currently have to clear out the results and run the calculation a second time. Injecting custom states also allows me to set a heading anchor when the walk states are first entered, to keep the target heading constant.

I can now walk and run pretty nicely. Turning can be accomplished either while stopped or while walking/running. Now I just seem to have a glitch when it first enters the walk state, probably something I am not setting properly in the turning angle algorithm.

Sample:

 

6 hours ago, Ser said:

I like the working navball and ability to rotate in 3 axis. I was planning to implement that myself. How is rotation implemented? Does it use engines or some "reaction wheel" magic?

Rotation uses the internal kerbaleva pack forces. That is, it uses pack fuel as normal. All RCS control is done by emulating a manual player input through the commanded rotation variable in kerbaleva. The SAS is actually just a quick custom pid that tries to set your rotation rate to zero.

 

Quote

What I don't like is SAS on EVA. Not to mention it is a totally unrealistic concept in stock vessels and that gets worse in EVA. So I think SAS feature is at least excessive.

The idea of having a pid that senses and kills rotation is not at all unrealistic. I would be surprised if real life EVA packs did not have such a feature. All it requires is a tiny amount of processing and an accelerometer, as opposed to "automatic prograde" which requires a flight computer that is aware of the current orbit, position, and relative orientation of the craft (in the real world, confounded by things like atmospheric drag, the gravity of the moon, etc). We are not talking about "automatic prograde" here, we are talking about killing rotation :)

Edited by Virindi
Link to comment
Share on other sites

@Ser I am not sure what the most polite thing to do here is. Should I plan to pull request all these changes? I've basically changed the entire plugin and tripled the amount of logic in it. Or would you rather I fork and make my own thread? If the latter, I don't want to keep junking up your thread with my updates. Let me know what you would prefer.

Or, I could create a temporary fork and later on you could see what you want to merge back. Up to you. I was actually thinking I wanted to rewrite the whole plugin...

I certainly do want SAS on EVA though :)

 

BTW, my work so far is at https://github.com/Virindi-AC/Through-The-Eyes if people want to try it out.

Edited by Virindi
Link to comment
Share on other sites

@Virindi, Actually, the most polite way would be to suggest some help prior to releasing videos and links to public.

I'm into some other stuff right now, so I need to find some time to try your changes and think how we do. Release your pressure a little, I'd prefer a productive cooperation. Let's start with a pull request, may be in the end I'll just hand the mod over to you, if you have a true passion to maintain it and not going to abandon it after a pair of months.

 

Link to comment
Share on other sites

No pressure. I just tend to get really involved in something and do a lot of work on it all at once while I can maintain an interest level. I had just started messing with it to see what I could accomplish and was unexpectedly proud of the results.

It is all GPL after all, you are free to take what you please at your leisure.

Link to comment
Share on other sites

I have been working today on figuring out why it glitches when you first start walking. I just figured it out...the kerbaleva's heading system NaNs out when the heading is already exactly right, which happens almost everytime in the idle state. This triggers the kerbal to turn left 4.5ish degrees. I tried overwriting the state fixedupdates with my own implementation and now walking is smooth :D

I still have to clean up this stuff a lot and be sure to test every situation a kerbal can be in (there are a lot!!), then I will put together a PR.

But, I keep hitting little glitches that bug me so I spend hours trying to fix them :)

 

Edit: Gah, just noticed it glitches slightly when you are already turning and then hit forward...

Edited by Virindi
Link to comment
Share on other sites

Surface movement is starting to get really good now. I see what you mean about patience testing...this has been a complete rat's nest of interdependence to untangle. Fix one thing, break three other things. I will PR soon, barring another "omg!" during retesting all the stuff I have already tested 20 times. There are more things I want to add that I can save for later, like going IVA while in a command seat, camera tracking the animation when recovering from ragdoll (tracking during normal movement would cause it to whip around), and camera stabilization to deal with the fact that all grounded objects in current KSP bounce around on the ground.

Edit: Also I want to add sidestep...

A note on use: since when walking you can turn your head, I made the 'v' key reset the kerbal's view to center.

Edited by Virindi
Link to comment
Share on other sites

46 minutes ago, Virindi said:

going IVA while in a command seat

I've had a request for that feature some time ago but my campaign hasn't reached the seat yet so it was suspended.

46 minutes ago, Virindi said:

camera tracking the animation when recovering from ragdoll

During one of the countless efforts to find the right camera I had the effect when a camera moved together with the kerbal's head just a little while standing animation was played. That was cool as camera wasn't stationary fixed at a point and that gave a feeling of being inside a live kerbal. Unfortunately I had to break it later. I think that effect was caused by setting the helmet transform as the camera's target. If you are interested you could play with that too.

Edited by Ser
Link to comment
Share on other sites

@Ser When I saw your "G-Effects" mod I had another idea: when in "force iva" mode, and the craft is still initializing, overlay the entire screen with black and some text like "loading". Once IVA is set, remove it. That way, you don't get to magically see the outside of your ship when switching vessels.

I'd want it to play nice with probe craft with the probe control room mod as well. That mod is the perfect companion to this one. I was thinking RPM external cameras on probes should go dark in probe control room when your craft does not have a connection, too. Hrm...

Edited by Virindi
Link to comment
Share on other sites

2 hours ago, Virindi said:

overlay the entire screen with black and some text like "loading". Once IVA is set, remove it. That way, you don't get to magically see the outside of your ship when switching vessels.

Yes, that makes sense.

Link to comment
Share on other sites

Hey @Ser I'm so happy this mod is continued. It's ridiculous how the vanilla KSP doesn't actually have first person, it's so awesome!

I've always used the old one and I'd be really happy if this is one could be as similar to the old. I just have 2 tiny suggestions:

First holding right click and moving around is a bit of a trouble. In the old version I could double right click to.. idk how to explain but you know, look around without holding the right click. I'd love to see that in this version! I tried double right clicking before going first person, but when I go first person the look around without holding goes away (although the cursor remains invisible).

Secondly the old version had the option to make the helmet borders invisible. Is it possible to add this option?

Oh also when I move forward (EVA suit in space) for some reason I start spinning, and I can't get the hang of controlling it. What am I doing wrong?

Again thanks a lot for continuing one of the best projects! Cheers!

 

Link to comment
Share on other sites

7 hours ago, Martian Music said:

I've always used the old one and I'd be really happy if this is one could be as similar to the old.

The old one had very unpleasant glitches caused by KSP version upgrades among other things. So some changes are imminent.

7 hours ago, Martian Music said:

First holding right click and moving around is a bit of a trouble. In the old version I could double right click to.. idk how to explain but you know, look around without holding the right click. I'd love to see that in this version! I tried double right clicking before going first person, but when I go first person the look around without holding goes away (although the cursor remains invisible).

That's because the old one used the default camera behavior so it was handled as a regular external cam. Since that caused issues the default camera behavior has been disabled and re-implemented by hand. That's why the difference, but I don't see any troubles to make it behave like you suggest.

7 hours ago, Martian Music said:

Secondly the old version had the option to make the helmet borders invisible. Is it possible to add this option?

Why do you need that feature? There's no trouble to hide the helmet but it adds realism and immersion to first person view. As of now you may try to use similar TextureReplacer's feature for that.

EVERYBODY

I had plans to merge @Virindi's work and release a new version on this weekend but real life runs faster than I can catch with it. I'll do that at the first opportunity.

Edited by Ser
Link to comment
Share on other sites

10 hours ago, Martian Music said:

Secondly the old version had the option to make the helmet borders invisible. Is it possible to add this option?

I suggest the Kerbal Hacks mod. It features "bubble" style replacement helmets to give you a full view of your surroundings without unrealistically removing the helmet entirely. :)

 

Link to comment
Share on other sites

3 hours ago, Ser said:

That's because the old one used the default camera behavior so it was handled as a regular external cam. Since that caused issues the default camera behavior has been disabled and re-implemented by hand. That's why the difference, but I don't see any troubles to make it behave like you suggest.

I understand :] yes it'd be super awesome if you make it behave like that. That's how first person views work anyway :D

Actually I love keeping the helmet visible but sometimes I prefer not having it because looking up/down becomes a little bit harder. Because you know, realistically the helmet should move with your mouse (head) movement rather than keyboard (body) movement so that's just why I sometimes prefer. You could just add the option in the config like the old version and make it visible by default.

6 minutes ago, Virindi said:

I suggest the Kerbal Hacks mod. It features "bubble" style replacement helmets to give you a full view of your surroundings without unrealistically removing the helmet entirely. :)

That actually sounds great! I'll check it out.

10 hours ago, Martian Music said:

when I move forward (EVA suit in space) for some reason I start spinning, and I can't get the hang of controlling it. What am I doing wrong?

By the way I still can't figure out what's happening. Any suggestions? And I actually meant in first person view, pressing W makes me spin around.

Link to comment
Share on other sites

1 hour ago, Martian Music said:

Because you know, realistically the helmet should move with your mouse (head) movement rather than keyboard (body) movement so that's just why I sometimes prefer.

That could be true for sport suits but not for EVA suits :wink: As I've said, I'll try to do that next time I get into this mod's coding.

1 hour ago, Martian Music said:

By the way I still can't figure out what's happening. Any suggestions? And I actually meant in first person view, pressing W makes me spin around.

Soon (I hope) I'll release a new version with major fixes and improvements made by Virindi. So my suggestion is to wait for it and see if the issue is gone.

Link to comment
Share on other sites

  • 2 weeks later...

Added a bunch more fixes to my PR to deal with the stock problems kerbals have when walking in low gravity (it is especially glitchy on steep slopes).

 

If you would rather, I would be happy to take over maintenance of this mod :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...