Normal view

There are new articles available, click to refresh the page.
Before yesterdayMain stream

How to get a object to rotate around another while still looking at a other

Im wanting my enemy's gun to rotate around the enemy but still focus on the player.
I have already tried to add a offset to the gun but it just hangs out next to the enemy and rotates toward the player not rotating around the enemy to the player. There are no errors in the code but when it is set to the enemy position it messes with some of the hit boxes and I havent been able to find any tutorials online to help with this specific problem.


Code (CSharp):
  1. public Transform player;
  2.     public...
How to get a object to rotate around another while still looking at a other
❌
❌