Jump to content

Weird, weird series of glitches, parts can't be selected, errors in attachment...


Shryq

Recommended Posts

So this was my problem before:

The problem is that when you try to attach the piece to any other part using the central node, while you're holding it, it snaps onto the node, but does not lose the red coloring and change to green like you would expect. If you click to try and attach it, it just drops, in exactly the same place that it should have attached, but it isn't attached.

If it is attached by any other node, say the ones on the sides, it works just fine, no issues at all. In fact you can even attach other parts (including that wing) to the center node, you just can't use center node to attach it to parts, only attach to it (as a child, if that makes sense).

Another thing is that I have it set in the .cfg to allow surface attach, but nothing can be put on it's surface, as if the wing doesn't have a collider at all (which it does, because I can pick it back up).

But I moved the main node to the bottom of the NODE{} list, and it worked. I can attach the wing to things now via the main node. However, when I launch the craft, the wing as well as the landing gear cannot be selected by right clicking. The landing gear still works with 'G' however. When I revert to the hangar, I cannot select those parts unless I move the parent part first.

The landing gear seem to 'break' and no longer retract if they hit the ground at any kind of speed. The also sometimes sink below the ground or spawn there. Can I use the 'Bounds' collider like the one that is used in the stock landing gear?

Errors I've been getting:

In the editor:

[Warning]: [RDTechTree]: No tech node found called

[Warning]: [RDTechTree]: No tech node found called Unresearcheable

[Warning]: BorderedTilingSpriteMesh: Mesh has 300 or more vertices and might not be dynamically batched!

[Warning]: HighlightingSystem : Framebuffer depth data is not available and can't be used to occlude highlighting. Highlighting occluders enabled.

[Warning]: Part Warning: part RangerGearR is not a child of rangerWing

In flight:

[Warning]: [CurrencyWidgetsApp]: No live widgets to Despawn!

Edited by Shryq
Link to comment
Share on other sites

You've applied a mesh collider to your visible mesh (I suspect), which is very bad practice. The warning is telling you that your collision mesh is more than the 255 polygon limit for a mesh collider, so I imagine that's why it's not working and the part is not selectable. Lack of collider on parts with wheels causes the kind of sinking issues you're seeing too.

If you _must_ use a mesh collider not a primitive (box, sphere, capsule), model a very simple mesh for the collider that approximates the shape of the part. The less polygons the better. To stop it appearing as a visible object, remove the mesh renderer component for that object. Should fix all your issues, I believe :)

Link to comment
Share on other sites

Ok, so I took your advice, I remade the colliders, I even redid the hierarchy like in the Bahamuto tut. The wing works fine, attaches fine, selectable after revert, etc. But the landing gear still has the same problem and now it does THIS:

I copied the part and then cut it into smaller pieces to make the colliders, there is two colliders on the Landing gear, and they both only have 8 vertices.

That error about the 300 verts, I actually get that regardless of whether or not I have any custom parts on the craft.

EDIT: Just did a clean install, completely stock, and I'm still getting that message.

All files:

https://www.dropbox.com/sh/pxv7fz46saxpdt5/AADHOsr00UHkzUeXEpnwADJra?dl=0

Edited by Shryq
Link to comment
Share on other sites

Best thing to do if sending stuff out of Unity is right click on the scene, model, texture, material etc. associated with the part, right click and select Export Package. This will bundle everything up into a .unitpackage which preserves links between what's in the scene and the blender file, otherwise all you get is empty game objects with no mesh and have to manually go through picking which bits in the blender file. Neat little tip that isn't immediately obvious.

From the YouTube, I'd say you've got a scale issue on some of the GameObjects - that's a very strange problem. I'll take a look over what you've posted when I have a few minutes. Odd that you get the collider poly warning, though. Maybe another part?

Link to comment
Share on other sites

I figured out what the problem was with the projectile landing leg, I had animated the part holding the suspension, instead of the actual leg mesh, which was at the same level as the suspension. Now it works to some degree. But I'm still having the problem of the legs becoming inoperable, sinking into the ground or snapping to the top of the suspension immediately after the animation is finished.

In regards to the packages you talked about, did you mean exporting FROM Unity or TO unity. I have been using the parttools exported to finish the parts.

They hold up the ranger just fine.

I've figured out everything except for the snapping to suspension limit thing. Even with the upper limit set to 0, the suspension distance in unity set to zero, it still does that.

This is what i'm talking about

Edited by Shryq
Link to comment
Share on other sites

A couple of things that are probably holding you up:

Scales are all over the place. Is there any way in Blender to normalise them back to 1.0? I'm not 100% but pretty sure this is causing the weird motion. A quick and dirty way to fix this might be to add some empty GO's for ModuleLandingGear to move about and have the mesh as child objects.

You've got mesh collider added to colliderbase and colliderspike, but no mesh filter. This definitely needs fixing, and may explain the collider error. You just need to remove the mesh renderer component to stop them appearing.

If the above doesn't get you a bit further, bundle it up as a .unitypackage I'll take a look at exporting it into game myself, see what I can find

EDIT: Just seen your latest post.

That's to do with wheel collider placement. You need the tail of the wheel collider, which represents the suspension travel pointing out beyond the bottom of the foot. At the moment, it's resting on the capsule collider, I believe, and the wheel collider is doing nothing. I'll take a peek at the BD video and double check what he did with his demo.

Yeah, it just creates a little package of stuff which includes all the metadata so it can be transferred into another Unity project with all the links intact. Nothing to do with the KSP export, it just makes life easier sending stuff back an forth in Unity.

Edited by lo-fi
Link to comment
Share on other sites

So. Moving the wheelCollider to 0,0,0 with a center at 0,0,0 makes the gear stop doing that snap thing. I added the mesh filters, but I still get that unselectable problem, which seems to be the only issue left.

So close 0_0

Thanks for the help so far!

https://www.dropbox.com/s/psju5tazngr93r1/rangergear.unitypackage?dl=0

Edited by Shryq
Link to comment
Share on other sites

No drama, we'll get it sorted. For reference, the stock modules don't seem to like having the WC centre moved away from 0,0,0. Better to move the GO.

Thanks, I'll take a look

- - - Updated - - -

Could you add the scene into that bundle please?

Link to comment
Share on other sites

Actually dude, you're pretty much there. A few things:

The two body colliders do not want to be in the WheelCollidersIgnore layer. It prevents them being used as normal colliders for picking up the part in the VAB.

The config was incorrect, and you had a capital W in wheelColliderName.

The suspensionTransform should be StrutR, not StrutRAnimator. This is probably the most common mistake when making wheels too. What you had was the object that the wheel collider was a child of being moved by the module. So when the suspension was being compressed, the wheel collider got moved. got compressed again, WC got moved more, so as the WC doesn't have a fixed position to do its job, it can't exert any force.


MODULE
{
name = ModuleLandingLeg

animationName = Scene
wheelColliderName = wheelCollider
suspensionTransformName = StrutR
suspensionUpperLimit =0.5
impactTolerance = 150
suspensionSpring = 2
suspensionDamper = 1
}

Just change the layer for the two large colliders back to default and you're good to go. It's just tweaking from here on in :)

Edited by lo-fi
Link to comment
Share on other sites

Awesome. Thanks.

Here's the full craft, minus a few pieces if you wanna check it out. Includes a .craft. Haven't fixed the main colliders yet, but everything else works.

Edited by Shryq
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...