• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Wire offset from model help

Drconfused

New member
I am attempting to make a mini battery bank for my power series mods which essentially is a model of a battery charger with 4 AA batteries in it. I can successfully get the model into game but have failed in all my attempts to align the wire origin with the model. Is there some secret on how to properly get this to line up?

Its working beautifullly otherwise, but don't want release this with either the wire floating or my model floating to match the wire.

A17.2_2019-02-28_19-32-45.jpg

 
I think there is a specific child object name that you need to use to connect wires to. I just don't know what.

 
I think there is a specific child object name that you need to use to connect wires to. I just don't know what.
That is what I was wondering. Hopefully there is an answer to this conundrum.

in the interum is there a way to make the wire invisible through xml?

 
Not that I know of. Xyth would know the child object name if anyone does.

The name may be in plain sight in the XML.

 
Could look at Untamed Wolf's Junction Box modlet. He has junction blocks that make the wire invisible.

 
Looking at the relay prefab, you may need to have your main prefab at the location of where the wire will be. Then under the prefab, you need a object named position. This will be the position of how it sits on a block. Then under position, you can put your model.

This is all just going off that prefab used ingame. Test a few things out and see what effects the position of the wire. From what I see, I think its the position of the prefab to where the wire attaches.

Here what I saw in the timer relay. The regular relay shows the same.

relay1.jpg

relay2.jpg

 
Perhaps just use the wireoffset property to position where the wire goes? <property name="WireOffset" value="0,0,0.5" />

 
Looking at the relay prefab, you may need to have your main prefab at the location of where the wire will be. Then under the prefab, you need a object named position. This will be the position of how it sits on a block. Then under position, you can put your model.
This is all just going off that prefab used ingame. Test a few things out and see what effects the position of the wire. From what I see, I think its the position of the prefab to where the wire attaches.

Here what I saw in the timer relay. The regular relay shows the same.

View attachment 27829

View attachment 27830

This was really helpful in getting my brain going towards figuring this issue out. Had to step away so hopefully I can get back in there and figure it out in conjunction with Xyth's suggestions.

Jayick was saying that having a child node in the unity file labelled Wire is likely where the wire attachment links in game. If I can avoid using the WireOffset it would be nice, but as a last resort I will use it!

Thankyou everyone!

 
It is not required to have any specially named child object in Unity. Its been a while but I recall using a child named WireOffset but don't recall the wire autoattaching without some xml offseting. The last models I made I didnt use a child object at all so I think it's flexible.

 
Back
Top