newaged Posted January 24, 2016 Posted January 24, 2016 Posting here again because I haven't learned how to github yet.I was going through some tutorials when an issue popped up. The camera position given by GameTSCtrl::OnMouseDown and %GameConnection.getCameraObject().GetPosition() were clearly different, and it was making the serverCmd provided by the tutorial behave oddly. I wasn't sure if that was intended or not, so I made a new method to use in its place. DefineEngineMethod(GameConnection, getControlCameraPosition, Point3F, (), , "@brief Gets the true position of this GameConnection's camera.\n\n" "@see GameConnection::getCameraObject()\n\n") { MatrixF transform; if (!object->getControlCameraTransform(0.032f, &transform)) return {0, 0, 0}; return transform.getPosition(); } Stick that somewhere near the end of gameConnection.cpp. %GameConnection.getControlCameraPosition() will return the position of the camera the same way OnMouseDown would. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.