Closed Open
current: |_ ||
centered: |-- ||
Where there is a wall to the left and a door to the right
rubenwardy wrote:By centered, do you mean in the center of the node rather than at the edge?
ie:Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
Closed Open
current: |_ ||
centered: |-- ||
Where there is a wall to the left and a door to the right
Does it have to have a middle split?
(Btw: it would be beneficial when you write lots of text to split it into paragraphs, and not ramble - it was quite hard to read that post)
Napiophelios wrote:you probably need to redesign the nodebox.
edit: nope wrong answer.
ShadMOrdre wrote:Tumeni,
Here are some simple conversions to assist you. This is based on the idea that the standard cube node of 1m is subdivided into 16 equally sized measurements, since this is both a multiple of 2 and since most textures are either 16x16, 32x32, or some other multiple of 2.
1 = 1
1/2 = 0.5
1/4 = 0.25
1/8 = 0.125
1/16 = 0.0625
1/32 = 0.03125
In various nodebox definitions, measuring from the center of the node:
A standard node would measure {-0.5,-0.5,-0.5 0.5,0.5,0.5} or {-1/2,-1/2,-1/2 1/2,1/2,1/2}
A slab would be {-0.5,-0.5,-0.5 0.5,0,0.5} or {-1/2,-1/2,-1/2 1/2,0,1/2}
A full height node that is only a quarter sized, similar to a vertical, centered, half slab would be like this:
{-0.125,-0.5,-0.125 0.125,0.5,0.125} or {-1/8,-1/2,-1/8 1/8,1/2,1/8}
As for your solution for center aligned doors, I am also interested, as my building_elements mod provides center aligned walls, columns, and other such shapes.
I noticed that the collision box for the fence allows the fence object, ie, the .obj mesh, to swing out from the center, and extend into the node beside it. The collision box for doors assumes a door that is positioned at a corner and swings into the node space, whereas a fence does otherwise. Give me a little time, and I think I can figure out not just center aligned doors, but truly centered doors, that swing from the center of the node.
Shad
sofar wrote:You can do this with nodeboxes, or with mesh nodes. Mesh nodes are a little bit simpler if you use a really large node (texture map is doable), which is why the default doors are mesh nodes.
The position of the mesh in blender is important. You will need to make 3 mesh nodes and the doors' position in blender needs to reflect the correct position in the game.
Because of symmetry, you will want a left-hinged and right-hinged door, so you will need to make 3 blender models total (the default doors get away with 2 because of the symmetry, but with middle-hinged doors you don't benefit from any symmetry).
The closed door mesh should intersect with the origin. Top view it should be horizontal.
The left hinged opened door should (from the top view in blender) swing out down and left.
The right hinged opened door mesh should (top view) swing out down and right.
Because you have 3 nodes in the end, you can't use the default door registration code. The door API won't work for this case.
ShadMOrdre wrote:Tumeni,
I just posted an update to my building_elements mod.
I have centered door shapes for both left and right doors. The fence gates didn't work quite yet, but are there to fiddle with. Chances are, I've missed something small.
The doors work! They swing from the side center, into the node behind them. Right and left are included. They can be made with any material also, so secret walls....
take a peek
Shad MOrdre
TumeniNodes wrote:funny note about my drawbridge... I still have not figured out how to get them so I can walk on them, I just fall through... but they look good :D
Nathan.S wrote:TumeniNodes wrote:funny note about my drawbridge... I still have not figured out how to get them so I can walk on them, I just fall through... but they look good :D
Assuming that you have two nodes for the drawbridge, one for closed/up, and open/down you should just need a collision box that extends the full reach of the open drawbridge.
Users browsing this forum: No registered users and 2 guests