Matt Duffield Posted February 28, 2016 Share Posted February 28, 2016 Hi everybody, I have a quick question. I am creating some models in Blender. I have created some empty objects in my model to represent spawn points when the game is playing. I am loading the export from Blender using the AssetManager. I grab my asset and then find my main mesh and assign all other meshes' parent to my main mesh. When I run the game in debug mode, I can see the labels of my mesh parts and the whole model moves correctly. However, when I try to use one of the spawn points, left_gun, they always spawn from where my object originally was created. I would have thought since I can see the spawn points attached to my main object correctly that their position would be updating and moving according to the parent. I tried to grab the parent's position and offset it by the left_gun position but it was still off. It became even worse whenever I rotated the parent object. I am sure this is a simple fix but I am trying to get this simple spawn point mechanism to work so that I can accurately represent bullets/rockets/etc. Thanks in advanced, Matt Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 28, 2016 Share Posted February 28, 2016 Hey Matt! As your objects (the spawn points) are attached to a parent, you may want to use spawnPoint.getAbsolutePosition() as position is relative to parent Quote Link to comment Share on other sites More sharing options...
Matt Duffield Posted February 28, 2016 Author Share Posted February 28, 2016 Hi Deltakosh, That was exactly what I needed! Thanks so much for the information, Matt GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
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.
Note: Your post will require moderator approval before it will be visible.