lookAt causes camera to be backwards

Hey all,
I’m creating an orbit trajectory type thing in VR, where I want my spacecraft to always point towards the center of the earth. I have a reference point where all of my child objects/variables (the spacecraft, the camera, etc) build off of. However, when i use lookAt on this reference point to try to turn all of those towards the earth at all times it instead points everything exactly away from the earth, like it just flips the command. Any thoughts?

After a bit more testing I found I could create another reference point, face it at 0,0,0, and flip the initial reference point 180 degrees because the new one was now looking out. Still though, anyone have any idea why it flips it backwards initially?

This might happen because your object’s geometry has a wrong orientation in the first place. The default forward direction for 3D objects (expect of cameras) is (0, 0, 1). So always ensure that the geometry of your objects respects this setting (meaning it “looks” along the positive z-axis when no orientation to the 3D object is applied).