Climberfx

OMICRON - Flying Space Car Development Thread

Recommended Posts

cockpit as drone core?

 

Share this post


Link to post
Share on other sites
Posted (edited)
2 hours ago, BGYT said:

cockpit as drone core?

 

Not exactly, the cockpit panel function as a remote core, so when you put the panel, your vessel can control itself.

I don't think we need more cores to the game, besides it would be to big to use in place of the cockpit. Until now, you just put a stock core inside the intake nose of Omicron and you have it. But with the panel, will be a implementation to the cockpit, so you can make missions without pilot to rescue then in a place, for example. Will be other stuff, helpful in the panel, like indication of the angle in your vtol rockets, functional navball, speed, altitude, etc...

 

Edited by Climberfx

Share this post


Link to post
Share on other sites

So, i think i did the code for NavBall. but i'm still unable to test yet, cause of the lac of .NET 3.5 framework on OSX. (officially that goes only until 3.1 yet).

So i need a time to go Windows and compile it and test it. But there are no erros in the editor/references. (Visual Basic 2019)

using System;
using UnityEngine;
using KSP.UI.Screens.Flight;

namespace Omicron
{
    public class Omicron : PartModule
    {
        private readonly NavBall myNavball;
        public Transform myNavballTrans;

        [KSPField]
        public String NavBallTransform;

        public void Start()
        {
            myNavballTrans = part.transform.FindRecursive(NavBallTransform);
        }

        public void FixedUpdate()
        {
            myNavballTrans.rotation = myNavball.relativeGymbal;
        }
    }

    public static class Utils
    {
        public static Transform FindRecursive(this Transform transform, String name)
        {
            if (transform.name == name) { return transform; }
            Transform tr = transform.Find(name);
            if (tr != null) { return tr; }
            foreach (Transform child in transform)
            {
                tr = child.FindRecursive(name);
                if (tr != null) { return tr; }
            }
            return null;
        }
    }
}

 

Share this post


Link to post
Share on other sites
Posted (edited)

Updates.

So, i migrate all project to Windows now, Unity, Visual Studio, Maya, etc., and manage to have Visual Studio compilation to work with KSP (1.7.3 yet here). 

I pass yesterday and today breaking my head to learn CSharp, and manage to solve the Navball function.

I'm in the finals for that part of the code, after that, will break head some more for altitude, speed, throttle speed jog, RCS, Comm, SAS, etc. For all functions of the cockpit i have.

Then go back to finish shaders and details for navball, like prograde, retrograde, normal, antinormal, etc icons.

Here how the code are at this moment:

using System;
using UnityEngine;
using KSP.UI.Screens.Flight;

// KSP 1.7.3 e Unity 2017.1.3p1

namespace Omicron
{
    public class Omicron : PartModule
    {
        public NavBall stockNavball;
        private Transform myNavballTrans;

        [KSPField]
        public String NavBallName = "navball_node";

        public void Start()
        {
            if (HighLogic.LoadedSceneIsEditor)
            {
                return;
            }
            stockNavball = FindObjectOfType<NavBall>();
            myNavballTrans = part.transform.FindRecursive(NavBallName);
        }

        public void Update()
        {
            if (HighLogic.LoadedSceneIsEditor)
            {
                return;
            }
            myNavballTrans.rotation = stockNavball.target.localRotation;
            print("Navball: " + myNavballTrans.eulerAngles + " " + myNavballTrans.localEulerAngles);
        }
    }

    public static class Utils
    {
        public static Transform FindRecursive(this Transform transform, String name)
        {
            if (transform.name == name) { return transform; }
            Transform tr = transform.Find(name);
            if (tr != null) { return tr; }
            foreach (Transform child in transform)
            {
                tr = child.FindRecursive(name);
                if (tr != null) { return tr; }
            }
            return null;
        }
    }
}

 

Edited by Climberfx

Share this post


Link to post
Share on other sites
Posted (edited)

Updates:

So, for the code above, it had X and Y axis inverted in rotation, besides the fact all the rest, start angle etc., was running accordingly.

Here i have the right code, some more heating in thinking and prospecting info, i got this, and already tested, navball is working now, in flight.

:D

The Code:

using System;
using UnityEngine;
using KSP.UI.Screens.Flight;

// KSP 1.7.3 e Unity 2017.1.3p1

namespace Omicron
{
    public class Omicron : PartModule
    {
        private NavBall stockNavball;
        private Transform myNavballTrans;

        [KSPField]
        public string NavBallName = "navball_node";

        public void Start()
        {
            if (HighLogic.LoadedSceneIsEditor)
            {
                return;
            }
            stockNavball = FindObjectOfType<NavBall>();
            myNavballTrans = part.transform.FindRecursive(NavBallName);
        }

        public void Update()
        {
            if (HighLogic.LoadedSceneIsEditor)
            {
                return;
            }
            Quaternion attitudeGymbal = stockNavball.navBall.rotation;
            var delta = Quaternion.Inverse(attitudeGymbal);
            delta.z = -delta.z;
            myNavballTrans.localRotation = delta;

            print("Navball Rotation = " + myNavballTrans.eulerAngles + ", Local Rotation = " + myNavballTrans.localEulerAngles + "Delta = " + delta);
        }
    }

    public static class Utils
    {
        public static Transform FindRecursive(this Transform transform, String name)
        {
            if (transform.name == name) { return transform; }
            Transform tr = transform.Find(name);
            if (tr != null) { return tr; }
            foreach (Transform child in transform)
            {
                tr = child.FindRecursive(name);
                if (tr != null) { return tr; }
            }
            return null;
        }
    }
}

 

Edited by Climberfx

Share this post


Link to post
Share on other sites
Posted (edited)

Working on Cockpit open version. Then Crew 1, 2, 3. 

And the separator will be another part, with support for life support (TAC), but this new opened parts will not have TAC resources anymore, give the lac of space.

Annotation 2020-04-19 173738 by Rafael Valle, on Flickr

49794363918_a05a23eab8_h.jpgAnnotation 2020-04-19 184227 by Rafael Valle, on Flickr

49794669283_d2027bf793_k.jpgUntitled by Rafael Valle, on Flickr

Edited by Climberfx

Share this post


Link to post
Share on other sites

On next update, Omicron will be running on 1.9.1.

Already Tested here and it's all fine. You just need to update the dependencies and voilá.

49799070348_5cd8c18182_h.jpg1.9.1 by Rafael Valle, on Flickr

Share this post


Link to post
Share on other sites

are you still working on the back dockingport?

 

Share this post


Link to post
Share on other sites
Posted (edited)

Yes @BGYT, it will be. ;)

Edited by Climberfx

Share this post


Link to post
Share on other sites

how long untill the update will be available

Share this post


Link to post
Share on other sites

Panel logic will take some time. Still undecided if going to wait to finish it, or release without it first, but even if i decide to let the panel for later, i have o lot to do on modeling, uvw and texturing for these new parts.

Probably 1 month or so.

At the present i have it all working with 1.9.1 already. If you wanna, i can upload a pre build pack to you download, just wait i finish  cockpit details and crew open variants first. The docking port for the back wait for next.

Let me know.

Share this post


Link to post
Share on other sites

im up for being a guinea pig / beta tester

Share this post


Link to post
Share on other sites

Great. Will be soon!

Finishing the adaptation for the crew's, need to do one more and this part is done. Then one more hollow adapter and i upload to you.

49804106361_6047072f68_h.jpgUntitled by Rafael Valle, on Flickr

Share this post


Link to post
Share on other sites
Posted (edited)

So, there it go!

For today, use orangedox link, because curse have a day off to show my uploaded file.

Have fun!

Edited by Climberfx

Share this post


Link to post
Share on other sites

Update. Finishing up the variants for back_closed, with strut, clean and Life Support types.

Now officially supported on CKAN!

:D

Share this post


Link to post
Share on other sites

 

Share this post


Link to post
Share on other sites

Video 2 update

 

Share this post


Link to post
Share on other sites
Posted (edited)

Update:

So, i finalize the variants for Wall_closed and Wall_hatch (5 for each), including:

  • Wall_xxxxx_strut_clean
  • Wall_xxxxx_clean_clean
  • Wall_xxxxx_strut_LS
  • Wall_xxxxx_clean_LS
  • Wall_xxxxx_LS_LS

Making it 2 parts with 5 variants for each.

 

Now i'm on the new part: Back_Hatch, that will have 3 variants:

  • Back_hatch_clean
  • Back_hatch_strut
  • Back_hatch_LS

49832472911_071fdc0847_b.jpg

49832472896_39520d18c4_b.jpg

49831935853_a50bb2de95_b.jpg

After finishing this part i go back to UVW and textures of cockpit panel.

 

Edited by Climberfx

Share this post


Link to post
Share on other sites

Done Back Docking part.

49833106897_e87503ddf2_b.jpg

49833106872_126d931626_h.jpg

49832800061_8302155149_k.jpg

Share this post


Link to post
Share on other sites

Docking cfg Check and ingame test for Omicron compatible size1 docking port.

49834339423_74d301ff7f_h.jpg

Share this post


Link to post
Share on other sites

Update:

Evolving on Cockpit Panel UVW.

49835472223_1afaad6e29_h.jpg

Share this post


Link to post
Share on other sites
Posted (edited)

Almost there for this part (UVW)

49836822862_c0131c90a5_h.jpg

Than Textures...

Edited by Climberfx

Share this post


Link to post
Share on other sites

Updates:

 

Share this post


Link to post
Share on other sites

Minor update with new part (Back_docking), and some more switchable parts (some need TAC Life Support)

 

Share this post


Link to post
Share on other sites

Updates:

Cockpit Panel UVW done.

Here a simulation on how it will works, but still not textured here:

49847688661_5ff30d3dee_o.gif

49847155793_b8668d01f9_o.gif

Next going to texture it, and then finish code.

Share this post


Link to post
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.