Jump to content

Engine attachment points


Recommended Posts

I know that i sound stupid but i need help with attachment points. I know that you put the attachment point location in cfgs but i'm struggling to get them right, and they are not perfect. I tried to guess by putting in Unity an empty gameobject where i want the attachment point and i copy the XYZ and put in cfg. I used 0 XYZ for the engine and yes, the attachment points are not correct. Did i edit the wrong numbers in point location , i don't know, i am a newbie:) . Any help would be greatly appreciated. Also:

My first EVER Blender Models(in .blend file, you can use the as you want)

First:

https://www.dropbox.com/s/d0jcqb7ygqg50g4/Motor001.blend?dl=0

Second

https://www.dropbox.com/s/f4h50ygqwo61e3y/StockEngine.blend?dl=0

 

 

 

Edited by AntINFINAIt
Link to comment
Share on other sites

There is a way to use emptys / gameobjects directly as attachment nodes. Haven't used that myself but you can find some infos here:

The config nodes are pretty simple:

	// Node definitions - Position X, Position Y, Position Z, Up X, Up Y, Up Z
	node_stack_top = 0.0, 1.5, 0.0, 0.0, 1.0, 0.0, 2
	node_stack_bottom = 0.0, -1.5, 0.0, 0.0, -1.0, 0.0, 2
	node_attach = 0.0, 0.0, 1.3, 0.0, 0.0, 1.0

Stack nodes need 7 values separated by comas. First three numbers are for the coordinate (unity axis, Y is up), the next three numbers define the directions of the node and the last number is for the size of the stack node. The direction of a node is very important and can be 1 or -1. For a node on top of your model the direction would be 1 on Y-axis, for a node below your model the direction would be -1 on y-axis (as shown in the example above). The size can be 0 (for 0.625 m diameter parts), 1 (for 1.25), 2 (for 2.5) or 3 (for 3.75).

Same goes for the attach nodes just without the need for a size.

I've opened your Motor001.blend and the highest vertex is ~2.63 and the lowest ~0.66 on the Z-axis (make sure you see global and not local coordinates in blender). So the following should be a good start:

	node_stack_top = 0.0, 2.63, 0.0, 0.0, 1.0, 0.0, 2
	node_stack_bottom = 0.0, 0.66, 0.0, 0.0, -1.0, 0.0, 2

Note that Blenders Z values are Unity/KSPs Y values.

Link to comment
Share on other sites

5 hours ago, Eleusis La Arwall said:

There is a way to use emptys / gameobjects directly as attachment nodes. Haven't used that myself but you can find some infos here:

The config nodes are pretty simple:


	// Node definitions - Position X, Position Y, Position Z, Up X, Up Y, Up Z
	node_stack_top = 0.0, 1.5, 0.0, 0.0, 1.0, 0.0, 2
	node_stack_bottom = 0.0, -1.5, 0.0, 0.0, -1.0, 0.0, 2
	node_attach = 0.0, 0.0, 1.3, 0.0, 0.0, 1.0

Stack nodes need 7 values separated by comas. First three numbers are for the coordinate (unity axis, Y is up), the next three numbers define the directions of the node and the last number is for the size of the stack node. The direction of a node is very important and can be 1 or -1. For a node on top of your model the direction would be 1 on Y-axis, for a node below your model the direction would be -1 on y-axis (as shown in the example above). The size can be 0 (for 0.625 m diameter parts), 1 (for 1.25), 2 (for 2.5) or 3 (for 3.75).

Same goes for the attach nodes just without the need for a size.

I've opened your Motor001.blend and the highest vertex is ~2.63 and the lowest ~0.66 on the Z-axis (make sure you see global and not local coordinates in blender). So the following should be a good start:


	node_stack_top = 0.0, 2.63, 0.0, 0.0, 1.0, 0.0, 2
	node_stack_bottom = 0.0, 0.66, 0.0, 0.0, -1.0, 0.0, 2

Note that Blenders Z values are Unity/KSPs Y values.

Here's a link to wiki as well:

https://wiki.kerbalspaceprogram.com/wiki/CFG_File_Documentation#Node_Definitions

 

I just want to further this already elaborate explanation.
If you forget the 7th value on the node, it will default to 1.25m. Note that, as I know, these determine how strong the connection is between two parts so the bigger, the stronger the connections.
About using the unity gameobject as a node value, I'm not too sure about how this is meant to work, but I do know that you can put the gameobject to where you want the node to be and you can get the exact values and put them in X, Y, and Z respective to their unity values.
More about the "next three numbers" after the first three, they could determine the rotation of your nodes not just strictly forward and backward, just to clarify, you can have a 1.0, 1.0 for x and y and it will point in between x and y, like a Cartesian plane from origin to the point. That's how I understand it, though.

Link to comment
Share on other sites

I've had good luck with adding an empty game object in Unity where I want the node (Blue axis pointing away from your part, towards what it will attach to). Then, in Unity, I name them ex:"StackTop" and in my config have the following:

NODE
{
	name = Top
	transform = StackTop
	size = 1
	method = FIXED_JOINT
}

where Top is my config file name, StackTop is the Unity empty GameObject name,  size is the node size and method is always FIXED_JOINT

Note that case is important - stackTop != StackTop

Link to comment
Share on other sites

16 hours ago, Eleusis La Arwall said:

There is a way to use emptys / gameobjects directly as attachment nodes. Haven't used that myself but you can find some infos here:

The config nodes are pretty simple:


	// Node definitions - Position X, Position Y, Position Z, Up X, Up Y, Up Z
	node_stack_top = 0.0, 1.5, 0.0, 0.0, 1.0, 0.0, 2
	node_stack_bottom = 0.0, -1.5, 0.0, 0.0, -1.0, 0.0, 2
	node_attach = 0.0, 0.0, 1.3, 0.0, 0.0, 1.0

Stack nodes need 7 values separated by comas. First three numbers are for the coordinate (unity axis, Y is up), the next three numbers define the directions of the node and the last number is for the size of the stack node. The direction of a node is very important and can be 1 or -1. For a node on top of your model the direction would be 1 on Y-axis, for a node below your model the direction would be -1 on y-axis (as shown in the example above). The size can be 0 (for 0.625 m diameter parts), 1 (for 1.25), 2 (for 2.5) or 3 (for 3.75).

Same goes for the attach nodes just without the need for a size.

I've opened your Motor001.blend and the highest vertex is ~2.63 and the lowest ~0.66 on the Z-axis (make sure you see global and not local coordinates in blender). So the following should be a good start:


	node_stack_top = 0.0, 2.63, 0.0, 0.0, 1.0, 0.0, 2
	node_stack_bottom = 0.0, 0.66, 0.0, 0.0, -1.0, 0.0, 2

Note that Blenders Z values are Unity/KSPs Y values.

Thank you !

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...