Arrow Pointer Implementation

Point at points the negative Z axis of the object toward the target. Assuming you have set the target to “you” correctly and the script otherwise functioning right, I’d assume that you don’t have the gun barrel modeled so it is pointing on the negative Z axis. If my assumption is correct, you can fix it one of two ways.

  1. Re-orient the model so that the gun barrel is pointing in the negative Z direction and re-import.
  2. Create a new entity with no model or primitive - essentially creating a Null object. Assign your pointing script to that entity instead of to your gun. Parent your gun to that entity. Then rotate your gun horizontally to compensate for the fact that it is not modeled with the gun barrel pointing in the negative Z direction.
3 Likes