In the documentation, there's no defined orientation for models. Each engine is different so one has to assume that given examples are correct. With Nexus, the example meshes show that models should be facing the -Z axis. That is the "front" of a model. So I've built all of my models with this in mind. I am however, experiencing unpredictable and incorrect behavior with hardpoint placement for my turrets. The model I'm working on (battlestar Pegasus) has some irregular turret placements so for the sake of simplicity I'll just use a typical battleship "row" of guns in my example.
The documentation states that the first point of a hardpoint is the right angle of the triangle, the second point is it's X-axis and the third point being the turret's resting position. Now, lets start with a little geometry refresh. This, is a right angle:
So according to the documentation, the first vertex of a hardpoint would be the red box, or right angle, then the second would be to it's left, dictating it's X-axis, then lastly the third vertex is where the resting position is. So if I were to build the hardpoint in this fashion:
One would think I'd have a correctly oriented cannon facing forward. This is not the case, however. This results in the cannons facing backwards from the bow of the ship. How is this? The first vertex is the center and it should point to the last vertex??? I'm not sure why it's doing this, or if the documentation is wrong, but it seems that hardpoints are pointing from #3 to #1, not the other way around. If I build the triangle 180º, like this:
THEN I get a gun where the barrels face the bow of the ship. What gives?
This brings me to my next problem and certainly the most infuriating of the two. I want a battleship firefight. Line abreast, firing your rows of cannon. I'm having the most difficult time trying to create this, though.
Ships are allowed to have 8 weapon slots for basic rotating turrets. They are designed to cover a 180º half-sphere of whatever Y-axis they are orientated towards, meaning for each slot, you should have a triangle on top and bottom, giving you 360º coverage around the ship. I want to have those 8 turrets available to fire down the line, regardless of which side the enemy is on, so I have to have all 8 turrets (16 hardpoints) on EACH side of the ship, 8 on top, 8 mirrored to the bottom, giving me my 360º bubble.
The problem I'm running into in doing this, is that the game engine fires from the OPPOSITE side of the ship from where the target is located. So if an enemy is to my right, the left side of the ship fires through through my hull, as opposed to right side of the ship firing like it should. So this is what I get:
These guns are all oriented face-forward, so I'm absolutely clueless as to why it chooses guns on the opposite side of my ship to fire at the enemy. If anyone has an idea, I'll give you a cookie.