I’ve made a super simple project called Gun Project that illustrates both methods.
I’ve made a Box that has a rectangular “barrel” oriented in the proper -Z direction but that also has a round “barrel” oriented in the wrong +X direction. Each of these boxes is parented to an “empty” or Null Entity.
I applied the pointAt.js to the box named “Box Proper -Z” and I’ve also applied a shifter.js to it so that you can move the box around with a right-press and drag of the mouse. I have set the pointAt Target to the conical target entity.
For the identical box and barrels labeled “Box Fixed with NULL” I have applied the same scripts to its master Null instead. I’ve then rotated “Box Fixed with NULL” by 90 degrees on the Y axis in its initial Editor settings. So the Null is still pointing its -Z axis at the cone Target because that’s what the lookAt function does. But because the box has been rotated 90 degrees, the round barrel that was pointing in the wrong direction is now pointing at the cone Target. This is the adjustment that fixes the “wrong” initial object orientation.
Right-click and drage and you can see that the boxes will point at the Target. You can change the targets to the Camera in Editor and see that the boxes and their barrels re-orient to point toward the camera. You can raise and lower the boxes and see that they stay pointing at the camera. This is hard to see because this orientation causes very subtle changes in perspective. But that is evidence that they are pointing at the camera as is the fact that the shadows shift as well.
This should be enough to illustrate the two methods, correct orientation and using a Null to adjust for an incorrect orientation.
Note: I disabled the scaling feature of the pointAt.js for this demonstration project.