kmajic Posted March 13, 2017 Report 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 Quote Link to comment Share on other sites More sharing options...
samme Posted March 13, 2017 Report 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). Quote Link to comment Share on other sites More sharing options...
kmajic Posted March 14, 2017 Author Report 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. 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.