Jump to content

[0.23] FirstPersonEVA


FlaccidUnicorn

Recommended Posts

This is a plugin that lets you see space from a Kerbal's perspective while on EVA by placing a camera inside the Kerbal's helmet.

video: for which embedding was not supported.

Controls

  • Enter EVA camera with keys as specified by HullCamVDS (default - and = keys) Or by right-clicking on Kerbal and pressing "Activate Camera"
  • Right-click and drag to look around (view re-centers on release of right mouse button)
  • Zoom with mouse wheel or keypad + and - keys
  • Exit EVA camera by pressing "v" to change to standard flight cameras

Download from Spaceport

Source Code: I grant anyone licence to do anything they want with the source code without restriction. Those of you who look at the source will probably be able to tell that I have little experience coding in C#, so I'm sure I did some things less than ideally, but it works, so I'm content.

Depends on HullcamVDS: forked from Mechjeb hullcam by Albert VDS. Specifically, it depends on the plugin, not the parts. The licence for HullcamVDS is stated as GPL.

Installation

I've been putting the FirstPersonEVA.dll in the "Kerbal Space Program\Plugins" folder along with HullCamera.dll and the settings.cfg from HullcamVDS.

Some Recommendations:

I recommend setting "EVA_ROTATE_ON_MOVE = False" in the game's setting.cfg so you can pitch up and down with the mouse and subsequently move without being forced back to the preferred "up" axis of the built-in camera modes.

The breathing sounds from chatterer make the experience far more immersive, and it was Mihara's RasterPropMonitor that compelled me to want first-person EVA bad enough to just write a solution myself.

Credit where credit is due:

I took the zoomable camera class from Albert VDS's Mechjeb hullcam fork, applied the tricks I saw used to answer this question in the Unity forums for click-and-drag camera manipulation, adapted Fel's solution for building the Vanguard parachutes into Kerbals on EVA, and benefited greatly from Forum Helper's pro tip that let me compile the project from the command line on Windows.

Future Plans / Current Shortcomings

I wouldn't recommend using the EVA cam for walking around on Kerbin (or anywhere with high gravity) at this point - I found that the motion of the camera is a bit jarring and for some reason there's a tendency to start going in circles when only pushing the forward button. I have no idea why for either of these observations.

If you look down all the time, you might catch a sliver of Jeb's chin now and then. I did my best to optimize the camera placement and clip distance - I realize now that the best solution is probably to have the Kerbal's head not render, but I'm not sure if that would apply to other camera views as well (this would only be relevant to multiplayer, I believe).

An indicator for whether or not the jetpack is active would be cool (it's currently hard to tell without test firing it)

Known Alternatives

As mentioned by DasBananenbrot, Chronothan has allowed for first person EVA with this plugin as well, which I had overlooked before coming up with my own solution.

Some brief comparisions from the user perspective:

  • Chronothan's plugin won't let you accidentally see your own chin
  • This plugin keeps the camera fixed with respect to the Kerbal's orientation when the Kerbal rotates, and re-centers the view when the mouse button is released while looking about
  • This plugin also lets you zoom.
  • Chronothan's plugin is broader in scope than simply first person EVA, lets you enter and exit first person view with the "c" button as one would enter and exit IVA view, includes a few more nifty options for always keeping the view first person between IVA/EVA, and doesn't have external dependencies.

I believe Lazor system also allows for first person EVA. I have not tried it personally to compare.

I'm sure there are others that I have not mentioned. If you are offended by this, I apologize, but I did not see many immediate solutions to getting first person EVA when I looked around before deciding to write my own.

Final Remarks

Free time is something I expect to have little of again shortly, so I'm not sure how actively I will be continuing development of this plugin after a few days time. With any luck, it will be irrelevant when 0.24 comes out (keeping my fingers crossed). For now, enjoy!

Cheers,

Flaccid Unicorn

Edited by FlaccidUnicorn
Link to comment
Share on other sites

Ah, interesting indeed, I hadn't seen that before!

EDIT:

Okay, cool - I took a look at the project you referenced in the addon dev section; here are my observations:

- Chronothan has a more elegant solution for not rendering the Kerbal’s head while in 1st person mode (by selectively not rendering the components that make up the head – and providing an option to not render any part of the kerbal at all) while I wrote my solution to use camera clip distance (meaning you might catch a glimpse of your own chin or pupil on rare occasion).

- The plugin I wrote simply offers another camera to cycle through ala HullcamVDS, while Chronothan’s works as you’d expect 1st person mode to, i.e. as a parallel to IVA , you can use the “c†button to toggle 1st person view while the Kerbal is outside a vehicle.

- The only thing I like more about the solution I came up with is that the Kerbal’s view re-centres when you’re done looking around, and you can’t look at the back of your own helmet from the inside (as you can with Chronothan’s solution). I might end up trying to see if it's possible to incorporate this aspect of plugin (oh, and zooming - you can do that too with the plugin I posted since I based it off of Albert VDS's zoomable camera class) into Chronothan’s code.

EDIT EDIT:

I edited the original post to mention this.

Edited by FlaccidUnicorn
Link to comment
Share on other sites

Ah, interesting indeed, I hadn't seen that before!

EDIT:

Okay, cool - I took a look at the project you referenced in the addon dev section; here are my observations:

- Chronothan has a more elegant solution for not rendering the Kerbal’s head while in 1st person mode (by selectively not rendering the components that make up the head – and providing an option to not render any part of the kerbal at all) while I wrote my solution to use camera clip distance (meaning you might catch a glimpse of your own chin or pupil on rare occasion).

- The plugin I wrote simply offers another camera to cycle through ala HullcamVDS, while Chronothan’s works as you’d expect 1st person mode to, i.e. as a parallel to IVA , you can use the “c†button to toggle 1st person view while the Kerbal is outside a vehicle.

- The only thing I like more about the solution I came up with is that the Kerbal’s view re-centres when you’re done looking around, and you can’t look at the back of your own helmet from the inside (as you can with Chronothan’s solution). I might end up trying to see if it's possible to incorporate this aspect of plugin (oh, and zooming - you can do that too with the plugin I posted since I based it off of Albert VDS's zoomable camera class) into Chronothan’s code.

I wrote in the thread if he still works in it...No response yet but maybe you want to contact Chronothan so you maybe can together work on this ....

Link to comment
Share on other sites

I sent Chronothan a PM.

I'm pretty sure the code I wrote will fit very nicely into his, but I'm running into trouble getting the plugin to work from compiled source code first. I'll ask on that thread if anyone else has successfully built it from source.

Link to comment
Share on other sites

ok i have a problem right now as in i can't see to get this to work...

how this is happening is that it may not be compatible with vanguard(which i have installed) so i will test to make sure

Edit: ok i tested it and...

it wasn't the vanguard but i still have the problem so there's that

Edited by Helix935
Link to comment
Share on other sites

Hmm. I'll give it a try with Vanguard as well to see what the issue might be. Are you using any other plugins as well? I haven't run into any conflicts with other mods yet, but it's not impossible.

It didn't occur to me until yesterday that I didn't give explicit instructions for how I expected it to be installed. I've since updated the OP, but I expect EVAFirstPerson.dll and the HullCamera.dll + settings.cfg from HullCam VDS to be in Kerbal Space Program\Plugins, not the GameData folder.

EDIT: I've installed the Vanguard Technologies Plugin, and nothings seems to be broken.

Edited by FlaccidUnicorn
Link to comment
Share on other sites

Can you provide any more information for me? Any other plugins active? Do you have all three required files in the Plugins folder, not the GameData folder? Did you previously have HullCam VDS installed, and were the default keys for entering the camera view changed from = and - ?

Edited by FlaccidUnicorn
Link to comment
Share on other sites

i have Hullcam currently installed and no the default keys are still the same and wait three files? i only see one DLL in the plugins.

ok actually i misread your question but what i mean is that if you mean by the three files within game data, i have the readme, the plugins folder and the DLL

and my mod list is already massive so i will just list asome more plugins i have that may cause the problem...

BoulderCo(Aggressive Text. Comp. and Clouds), Cacteye, and texture replacer. These are only a few of what i have but i should mention i removed some cameras from the Hullcam VDS folder so that may be a problem

Link to comment
Share on other sites

Okay, I'll try to be even more explicit. My guess is still that the files aren't organized as I'm expecting them to be:

IjQA82J.png

None of these files are in the GameData directory. Can you confirm that this is where your files are located?

Removing the parts files from HullCam VDS should not be a problem.

Edited by FlaccidUnicorn
Link to comment
Share on other sites

Okay, I'll try to be even more explicit. My guess is still that the files aren't organized as I'm expecting them to be:

https://i.imgur.com/IjQA82J.png

None of these files are in the GameData directory. Can you confirm that this is where your files are located?

Removing the parts files from HullCam VDS should not be a problem.

ok i see there is only the FirstPersonEVA .dll in the plugins folder for me. i will see what happens if i copy and paste the hullcam VDS stuff into that folder

Edit: ok i just tested and it worked. the plugins folder was just missing the hullcam vds plugin and settings which is why it didn't work for me

Edited by Helix935
Link to comment
Share on other sites

  • 1 month later...

great mod just so you know and just so you know to get it to work you need to work (if my above post wasn't clear(I have ADD so i may have voiced the instructions incorrectly)) you have to copy and paste the hullcam dll and settings into the plugins folder with the FirstPersonEVA dll if it didn't have them in originally...

just saying

i apologize for double post but i prefer this mod over the Lazor systems version anyway and would hate to see this die

Link to comment
Share on other sites

  • 4 weeks later...

hmm looks like flaccid unicorn is no longer here and since i lack skill with c++ i can't continue this especially since i have just learned that it can work along side steam gauges to make an eva HUD hmm...

Link to comment
Share on other sites

You are the hero this thread needs. Thank you!

hey there's one thing you should know about using Hullcam with it...

you have to copy the setting and Hullcam dll into the folder in first person eva that contains that first person eva dll in order to make it work properly

Link to comment
Share on other sites

hey there's one thing you should know about using Hullcam with it...

you have to copy the setting and Hullcam dll into the folder in first person eva that contains that first person eva dll in order to make it work properly

You're awesome, I never knew this. Thanks!

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...