Jump to content

[1.0.x] [V1.9f] Kerbal Foundries wheels, anti-grav repulsors and tracks


lo-fi

What to work on next?  

1,282 members have voted

  1. 1. What to work on next?

    • More wheels
      123
    • More tracks
      453
    • Rover bodies
      241
    • Landing gear
      137
    • Landing legs
      108
    • Something completely different
      193


Recommended Posts

 

We know that physx update along with unity 5 has broken wheels. So what about pulling relevant wheel code from physx that worked (2.8?) and then compiling it as a plugin or part of the plugin for current ksp? One can register at nvidia and then apply to get access to proper private github repositories to check code of current physx (3.3). Or just google "physx 2.8 github" and one just finds libraries with physx 3.3 and 2.8. I guess it would be quite complicated since physx = c++ language and then vehicle physics was part of the core physx sdk in 2.8 so referencing and libraries are interconnected and it was some sort of pulled as an extension in the current version. Then there might be licensing issues as well. Other option would be to just download vehicle code from current version of 3.3 and just 'fix / upgrade it' to suit mods needs. My logic might be totally flawed here though or it might be too time consuming so ingore if it's a cul-de-sac idea :P

Edited by riocrokite
Link to comment
Share on other sites

On Sunday, November 06, 2016 at 10:28 AM, riocrokite said:

 

We know that physx update along with unity 5 has broken wheels. So what about pulling relevant wheel code from physx that worked (2.8?) and then compiling it as a plugin or part of the plugin for current ksp? One can register at nvidia and then apply to get access to proper private github repositories to check code of current physx (3.3). Or just google "physx 2.8 github" and one just finds libraries with physx 3.3 and 2.8. I guess it would be quite complicated since physx = c++ language and then vehicle physics was part of the core physx sdk in 2.8 so referencing and libraries are interconnected and it was some sort of pulled as an extension in the current version. Then there might be licensing issues as well. Other option would be to just download vehicle code from current version of 3.3 and just 'fix / upgrade it' to suit mods needs. My logic might be totally flawed here though or it might be too time consuming so ingore if it's a cul-de-sac idea :P

I actually spent quite a bit of time investigating this route when I first started on the wheels.  Sadly it is not a workable concept for a few reasons:

First, only the PhysX 3.x+ code is publicly available (even after signing up/joining the PhysX dev group).  The 2.8 code is still binary only, and unavailable for public viewing (at least that I could find anywhere).  The 3.3 code has some... inherent limitations on it which are the root of the problem we are trying to work around (rigidbody orientation, auto-tuning spring/damper stuff; all of the wonky bits that we are trying to avoid are coded into the low level PhysX 3.3 code).  We would need access to the 2.8 source code in order to extract the previously working wheel implementation, and there is no guarantee that it would work/could be integrated with the PhsyX 3.3 code base.

Second, PhsyX runs the entirety of the Unity physics, and there are no hooks into the low-level aspects of it.  Even if we could take the PhysX 3.3 code and bash it into what we need it to do, it would be impossible to integrate it into any Unity game because Unity does not allow low-level access to the PhysX constructs, linking, or data.  Might be possible with other game engines, and certainly usable with a custom engine, but not applicable to KSP.

Third, as you pointed out, there is the C++ / C# language differences.  Thankfully Unity allows full use of native code (c++), so we could compile the wheel code into a c++ .dll file, but we would probably need to compile it independently on a per-platform basis.

Not a bad idea at all, sadly it is one that won't work for our uses.

 

Link to comment
Share on other sites

On 7-11-2016 at 2:02 PM, TOMMY (JEB 2.0) said:

hey i have a ida for a weel/track make one that cal go 1000+ m/s

Not trying to be rude, but that is a really stupid idea. It is far to OP, unstable, and even more unrealistic then the antigravity devices. I do agree there should be some kind of racing wheels tho but those should be able to go 100m/s maximum.

Link to comment
Share on other sites

2 hours ago, BlueDragon1504 said:

Not trying to be rude, but that is a really stupid idea. It is far to OP, unstable, and even more unrealistic then the antigravity devices. I do agree there should be some kind of racing wheels tho but those should be able to go 100m/s maximum.

... it is spost to b crazey bluedragon1504

Link to comment
Share on other sites

23 hours ago, Moggiog said:

How's the devving going? Any progress?

Not really, I'm afraid. 

With reference to mod comments, I'd suggest simply ignoring certain people, folks. Sadly @riocrokites post explaining that this was something you could do got deleted, but it's easy enough to figure out, and rather handy. 

Link to comment
Share on other sites

50 minutes ago, 0111narwhalz said:

Chances are, you can achieve this via .cfg edits after the mod is released.

@lo-fi What's the latest roadblock, if I may inquire?

Don't fee... Ah, whatever. Unity. KSP. Something. I've no idea. Ran out of steam for fighting with it, so have been doing other things for a while.

Link to comment
Share on other sites

3 hours ago, BlueDragon1504 said:

Not trying to be rude, but that is a really stupid idea. It is far to OP, unstable, and even more unrealistic then the antigravity devices. I do agree there should be some kind of racing wheels tho but those should be able to go 100m/s maximum.

Interesting, judging a idea in a game by comparing it to realistic.

21 minutes ago, lo-fi said:

Don't fee... Ah, whatever. Unity. KSP. Something. I've no idea. Ran out of steam for fighting with it, so have been doing other things for a while.

@lo-fi Is it possible create a single part with multiple wheels by stock wheel module?

Edited by flywlyx
Link to comment
Share on other sites

IIRC, there was some disccussion about that a few pages ago, and the answer was simply "NO". I have no direct experience: I gave up messing with stock wheel modules back around .24.

Link to comment
Share on other sites

21 hours ago, flywlyx said:

Is it possible create a single part with multiple wheels by stock wheel module?

I can say, with the benefit of having tried,  that this is not possible with U5 wheel colliders,  I could make dual  and quad wheel axles right up to and including KSP 1.0.5. and have things like built in landing gear etc  I have likely tried every possible hierarchy since 1.1 and it simply does not and will not work. Even though the modules themselves lead you to believe it should, with an entry for module position in the cfg.   Which is why the heavy landing gear makes me laugh. all those visible wheels are just decoration, there's still only one wheel collider

Link to comment
Share on other sites

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