• Content Count

  • Joined

  • Last visited

Community Reputation

2 Neutral

About uscespc

  • Rank
    Bottle Rocketeer

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I'm working on a mod for a craft that only flies over the surface of a planet and can never reach orbit on its own. When in map view you see the orbit circle and an Ap icon for the craft when flying. Is there some way in code to disable orbit calculations or disable the map orbit display for the craft. Thanks
  2. Thank You Looking at your code gave me a clue on how to solve the land to water transition. On land I use raycasts with a PID controller to adjust power to the hover nodes and this didn't work over water. In your code I saw you use height = FlightGlobals.getAltitudeAtPos(rcTransform.position); so once I detect the transition from land to water I use this value in the PID controller Error field. Land: HForce = PIDController(TargetHeight, hit.distance) Water: HForce = PIDController(TargetHeight, height) Works great, never thought it would be this simple. Here is a video showing land to water and back. Demo3
  3. I tried them all 0-32 the only ones that returned hits were 10 Scaled Scenery and 15 Local Scenery. I use 15, 10's hit info was inconsistent. Thanks for the suggestion.
  4. It's all code, I've solved the thrust, turning, hover issues it's when you are hovering over land and cross over to water, water doesn't return raycasts which I use in a PID, AddForceAtPosition construct to hover. Video2
  5. I created a hovercraft that works well on land but I'm having a problem with water. When you transition from land to water the craft maintains the attitude it had on land, this is because it's transitioning from raycast feedback to just plain addforce over water. What I would like to do is level the craft over water but I can't seem to find a way to do it. The video shows the land water transition. Just looking for some suggestions or places to look. Thanks Video
  6. I have a cube that I use: transform.Position = Vector3.up * Mathf.Cos(Time.time); in Update and it floats up and down on the Y axis just fine in the Editor . On the runway Object Inspector shows the Y axis values being changed but the cube moves left and right. DebugStuff shows the transform Y axis to be pointing up. I'm missing something , doing something wrong or just don't understand something. Any suggestions on where to start looking? Thanks
  7. Finally got one to work. In version 1 the shuttle was rigidly constrained by the shaft, version 2 uses a 4x4 hollow shaft with a 3.5x3.5 shuttle in the middle allowing for drift. As the shuttle goes up it will drift back and forth but doesn't crash the game. I'm also using this code in FixedUpdate: (have to test if removing makes a difference) part.Rigidbody.angularVelocity *= 0; vessel.angularMomentum =; Here's a pic at 59.5Km (I stopped there to test stopping)
  8. The shaft is the easy part. I did it 3 ways. 1. Create it in Blender and make it 60000m high. 2. Create a 20m shaft in Blender and scale it in Unity by 3000. 3. I was able to adapt the code in linuxgurugamer's NRAP mod and created a shaft you could scale to any height. I then created a shuttle that could move up the shaft and that's where I had problems. After a point the games blows up with the following log entries: I'm not sure what is causing the problem PRE or just game mechanics. Errors Video BTW: I'm not much of a modeler or a coder. Just FYI it was interesting getting to this point.
  9. I'm using Unity 2017.1.3p1 Personal and am seeing different .anim file structures based on the following: 1. Project Settings ---> Editor ---> Asset Serialization Mode = Force Text (KSP fails to load part) 2. Project Settings ---> Editor ---> Asset Serialization Mode = Force Binary and then do Project Settings ---> Editor ---> Asset Serialization Mode = Force Text (part and animation work fine after editing) In scenario 2 I remove material from the attribute and change classID from 23 to 21 for it to work. Is this a known Unity problem, a known work around or am I just doing something wrong? Thanks [snip]