EndlessWaves
-
Posts
1,359 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Posts posted by EndlessWaves
-
-
each collider = more phy engine calculation wich is not good at all as it's actually one of the main limit
Is it actually the colliders' date=' or is it the rigidbodies/joints that are the limiting factor in KSP? Even if not the colliders though, it is a good idea the keep the performance load down to allow more time to be spent on the other physics components.
From the unity documentation (the engine KSP is based on), emphasis mine:
CollidersCollider components define the shape of an object for the purposes of physical collisions. A collider, which is invisible, need not be the exact same shape as the object's mesh and in fact, a rough approximation is often more efficient and indistinguishable in gameplay. The simplest (and least processor-intensive) colliders and the so-called primitive collider types. In 3D, these are the Box Collider, Sphere Collider and Capsule Collider. In 2D, you can use the Box Collider 2D and Circle Collider 2D. Any number of these can be added to a single object to create compound colliders. With careful positioning and sizing, compound colliders can often approximate the shape of an object quite well while keeping a low processor overhead. Further flexibility can be gained by having additional colliders on child objects (eg, boxes can be rotated relative to the local axes of the parent object). However, you should be sure that there is only one Rigidbody and this should be placed on the root object in the hierarchy.
There are some cases, however, where even compound colliders are not accurate enough. In 3D, you can use Mesh Colliders to match the shape of the object's mesh exactly. In 2D, the Polygon Collider 2D will generally not match the shape of the sprite graphic perfectly but you can refine the shape to any level of detail you like. These colliders are much more processor-intensive than primitive types, however, so use them sparingly to maintain good performance. Also, a mesh collider will normally be unable to collide with another mesh collider (ie, nothing will happen when they make contact). You can get around this in some cases by marking the mesh collider as Convex in the inspector. This will generate the collider shape as a "convex hull" which is like the original mesh but with any undercuts filled in. The benefit of this is that a convex mesh collider can collide with other mesh colliders so you may be able to use this feature when you have a moving character with a suitable shape. However, a good general rule is to use mesh colliders for scene geometry and approximate the shape of moving objects using compound primitive colliders.
-
'mod' covers a variety of things. From the bits you mentioned it sounds like you're initially interesting in making new parts for the game, is that correct?
If so that's one of the most common mods so there's plenty of guides available - I'd start by reading the stickies in the various forum of the add-on section.
Sketchup isn't the best choice for game modelling but there are plugins that provide some help such as PlayUp. Blender is generally the modelling tool of choice as it's free and very capable, unfortunately the unpolished and clunky interface (it doesn't even have tooltips) means that a bit of concentration is required to learn the basics.
-
I assemble my payloads with the empty tanks, thereby saving on launch weight, since I launch everything to a fueling station in LKO anyway before they head anywhere.
Empty tanks increase the minimum launch weight rather than decreasing it. Using full fuel tanks with fuel lines attached to drain them as part of the launch stage will get you a lighter overall rocket.
If you run the Steam version, the update will happen automatically, and depending on what files get changed, you may lose your modded versions. This is another good reason to backup your files before modding.Yeah, if you want to mod it's usually best to avoid anything that modifies things on your private computer without any involvement from you.
-
You mean like... creating multiple box or cylinder objects in Unity to approximate the shape of the model and designating them as colliders?
If you want to do it that way yeah, then delete the mesh filter & mesh renderer components afterwards. Personally I just add the box colliders (to extra empty gameobjects if the visual mesh is a single object) and adjust them numerically to fit.
Unfortunately unity doesn't have a flat-ended cylinder primitive so a inline rocket parts usually will need a mesh collider but for things like rover parts it's worth looking at.
-
It should be simple, but I've tried a bunch of functions and variables within moduleengines and partmodule without any success.
We know it's KSPEvent tagged because it appears in the GUI, so as per sticky you use partInQuestion.SendEvent("EventName");
As to getting the event name, try iterating through PartModule.Events and seeing what name corresponds to the GUIName of the right click menu (alternative just guess, they're usually something simple and similar like Shutdown or ShutdownEngine).
-
In Blender, I'm trying to make a collision mesh to import into Unity. Is it best to just make another .blend file with the mesh?
It's best to avoid mesh colliders entirely and use multiple primitive colliders where you can. If you do need a mesh to wrap a mesh collider around then it doesn't matter how you import it, if it's easier for you to model it in a separate file then go ahead and do so.
-
Given the average PC game main menu these days can barely be seen between the animated adverts and social media links a single word really isn't going to bother me.
-
but can you point me in the right direction as to what software I should use and where to get it?
Use whatever you want, the main requirement is that you produce a common language runtime assembly at the end of it. The most popular choices around here are the C# IDEs - MonoDevelop/Xamarin Studio, SharpDevelop and Visual Studio (Express).
After that I floundered. Other than writing to a log, I really don't know where to start. Hopefully this will be enough to get you started, or give others a springboard to continue helping you (and me! )What are you trying to do?
-
The part tools don't function properly if unity encounters any errors (generally, not with the part tools). That null reference exception listed at the bottom of the screen is probably what's interfering. Click the console tab and see what the rest of the details about it are there.
-
but how much experience should I have before trying to make a plugin?
In general none at all, a basic plugin is a very simple thing.
Obviously if you want something more complicated you may want to start from scratch when you've got more experience, but making a rubbish version of it first both gets you insight into the game and problem as well as the general experience.
-
You've got two decimal points in your mass entry, so I'd assume it's interpreting your 0.1.228 as 01.228. Remove the rogue decimal point and it should be fine.
-
Then why does my task manager tell me that my computer is only using a total of 2.2GB of RAM when KSP is running...?
EDIT: I've also made sure to end all non-critical processes when KSP is running, to reduce RAM usage.
If you're running a 32-bit version of Windows 7 then KSP will be limited to 2GB instead of the usual 4GB.
-
A static variable is accessible by all objects of a particular class.
-
From the error message it may be a scope issue, can you post your code?
specifically the following code compiles fine for me:
public class SomeClass : PartModule
{
[KSPField]
public float color_red = 1.0f;
[KSPField]
public float color_green = 1.0f;
[KSPField]
public float color_blue = 1.0f;
public Color tracerColor;
public override void OnStart(StartState state)
{
tracerColor = new Color(color_red, color_green, color_blue);
}
} -
Iterate through the components of the EVA Kerbal GameObject and it's children and you're likely to find the relevant objects that control EVA thrusters. I can't promise they've got public methods for what you want but it's where I'd start looking:
Example method (call as PrintTransform(kerbalsTopLevelTransform, "") ):
private static void PrintTransform(Transform aTransform, String currentPath)
{
currentPath += "/" + aTransform.name;
print(currentPath);
foreach(Component aComponent in aTransform.gameObject.GetComponents<Component>())
{
if(aComponent.GetType().ToString() != "UnityEngine.Transform")
print(aComponent.GetType());
}
foreach(Transform childTransform in aTransform)
{
PrintTransform(childTransform, currentPath);
}
} -
thrustVectorTransformName = thrustTransform
This is the usual cause of the problem. This line tells the game which object to apply the thrust to, so if you're not getting any thrust applied it's likely that this object is misnamed (it's case sensitive, so ThrustTransform wouldn't work) or missing entirely (outside the exported hierarchy, forgotten etc.).
-
A common cause of lag is message spamming to the logs, so open your log (alt+F2 or alt+F12) and see if you're getting messages scrolling faster than you can read then (or almost). A copy of the log is saved as KSP_Data/Output_log.txt
-
Very few games release their source code, Minecraft is unusual in that respect. You have to extend the game and call it's public methods, recompiling it isn't an option.
-
how do i code this in order to make these 3 variables dictate color of the tracer?
[KSPField]
public float color_red = 1.0f;
[KSPField]
public float color_green = 1.0f;
[KSPField]
public float color_blue = 1.0f;
public Color tracerColor = new Color(color_red, color_green, color_blue);
-
The classic Wings3d tutorials are here: http://www.wings3d.com/paulthepuzzles/aardvarks.html
It works fine for basic KSP models, although of course it doesn't support advanced features like animations.
-
I'm only guessing here but it looks like the sort of issue caused by blender saving transforms rather than applying them to the vertex positions, but I'm not sure how that affects animations.
-
dae importing as a whole is depreciated.
The behaviour you describe sounds like your mesh might not be convex, if you want a non-convex collision mesh then it's more reliable to make it from multiple convex shapes.
-
By "directly and dynamically", I meant that I want a kOS-like console in the game that I can type C# code into.
R4m0n did it a year ago, although I don't know if he ever released an updated version:
-
Project management is up to you, KSP, the forums and spaceport have no support for any versioning or similar tools so use whatever's familiar to you. Ditto for IDE, I don't like visual studio express due to it's limited code folding support but all three work equally well, as does a simple text editor and the .NET or Mono command line compiler.
Unity is used for exporting Part models. It's not used for anything involving plugins directly. A specific version isn't needed, squad keep updating the version the game runs on, it can been seen on the first line of the output_log.txt file in the KSP_data folder (a log that's very useful for modders as it contains an expanded version of the in-game console). For 0.22 it's 4.1.2f1 but older and newer versions will likely work equally well, there's not much of it actually used for KSP.
The official unoffical "help a fellow plugin developer" thread
in KSP1 C# Plugin Development Help and Support
Posted
Hmm, you could try SendMessage instead.