XNA - positioning after rotation
- by DijkeMark
I have a turret with a 2 gunbarrels. The turret rotates towards my mouse. So far no problem. When it creates a few bullets and positions them at the end of the gun barrels.
Here is the problem. It only works the moment the gun is point upwards. The moment it rotates the end of the gun barrels have moved ofcourse, thus the bullets don't spawn at the end of the gun battels, but at the place the where the gun barrels are when the turret is pointing upwards.
How can I check where the end of the gun barrels are the moment it rotates?
Thanks in Advance,
Mark Dijkema
PS. If you need code please let me know, I didn't post any yet, because I didn't what code you would need.