kmajic Posted March 13, 2017 Share Posted March 13, 2017 Hi everyone! I'm still learning and I think I got in way over my head. I'm trying to have a turret that will fire from multiple guns while facing the cursor. This means that the bullet reset-point keeps changing, but since I'm pivoting the sprite group, the coordinates are always staying the same! What do I do to get coordinates that update on every frame, which I can then use as bullet spawning point? Edit: Link removed Link to comment Share on other sites More sharing options...
samme Posted March 13, 2017 Share Posted March 13, 2017 One way is bullet.reset( part.gun.world.x , part.gun.world.y ); // or bullet.reset( part.gun2.world.x, part.gun2.world.y ); That may work better if the guns have anchor (0.5, 0.5). Link to comment Share on other sites More sharing options...
kmajic Posted March 14, 2017 Author Share Posted March 14, 2017 Thank you so much! It didn't occur to me I could get proper coordinates by referencing the world. I made the change and it's working as intended. Link to comment Share on other sites More sharing options...
Recommended Posts