If you're crouched on a ridge and try to shoot an arrow downward off that ridge, your arrow may teleport backward and impact the ground beneath your feet. Why does this occur, and how did I fix it?
When you attempt to fire an arrow, the game needs to know where to spawn that arrow. Skyrim is programmed to find the WEAPON node in your animation skeleton -- sort of like an invisible limb that happens to be positioned a few inches in front of the tip of your bow -- and spawn the arrow there. There's a bit of a problem, though: your animations aren't physics-based. This means that if you were to walk up to a wall and try to shoot an arrow at it, the WEAPON node would be on the other side; the arrow would spawn on the other side and you'd effectively be able to shoot through walls.
To prevent this, Bethesda does a raycast for the first few frames of an arrow's flight: they draw a line from your position to the arrow's position. If that line hits anything, then the arrow is moved to the hit position, where it'll collide and bounce away. But... what is your position? And what is your arrow's position?
Well, your position is a single point in space located directly between your feet, on the ground you're standing on. The arrow's position is its tip. The picture below should make it quite clear why this is a problem.

That's my test character standing on the cliff near Markarth's guard tower, firing down into the marketplace. The cliff she's standing on is outlined in red. I drew a blue line to represent the raycast from her position to the arrow's position; as you can see, that line intersects the cliff. This means that in the vanilla game, the arrow would spawn in front of her bow and then, on the first frame of its existence, immediately teleport backward beneath her feet and impact the cliff she's standing on.
The fix is relatively simple: I changed the raycast so that instead of going from a character's feet, it goes from roughly their center of mass. This still allows us to accurately prevent you from shooting through walls, without creating false-positives when you shoot downward off a ridge.
23 comments
Sure, the harrow is "held" by the other hand, but the space between the hands can only be empty, or the arrow can't be put on the bow.
But the point where the arrow contacts the bow is a point where all of the arrow has to pass through, across it's entire length. So that point works well. But defining the point might not be easy, so taking the hand right next to it as reference should work.
That way it would also stop you from shooting through walls. Your hand is on "this" side of the wall, so if the arrow spawns on the other side, drop it.
but
After the latest reinstallation of my game and Mod, I noticed a situation.
if my character is standing on the left side of a wooden pillar(or a stone wall)and close to it, when I shoot an arrow, most of the time the arrow will be spawned in the correct location, but sometime the arrow may shoot out from the right side of the pillar.
If my character is on the right side , the arrow may spawned from the left side of the pillar.
Perhaps, I guess, the program misjudged the location of the weapon node, and then the arrow spawned on the other side....
before using this mod, this situation exists in my game, but I didn't notice it
the other thing that bothers me is when the arrow‘s spawning location is misjudged. then, the arrow is to be spawned from the other side , but the spawning location is not certain. It may fly out from a position very close to the pillar, or shoot directly to this pillar, or may be the arrow will be spawned at a location where we cannot even see——out of current scene, inside the nearby wall for one
The only thing I can be sure of is that if I draw a straight line perpendicular to the direction of aiming, the arrow must be spawned on the straight line, and the direction of shooting is parallel to the direction of aiming. but the distance between the arrow and the character seems to be random
What can I do to solve this problem ?
If the arrow is deflecting off of the pillar (and this could include it deflecting off of the pillar while technically being inside of the pillar), then the situation could be related to the downward-aiming bug. There isn't really anything you would be able to do about it; the fix would involve hacking the game engine (in the same manner I did) and adjusting the logic for how the game tests the trajectory of the arrow at the time that it is fired... but I'm not sure what more one could change, with me correcting the raycast height.
(Hm... Thinking about this some more, the WEAPON node is in front of the player but it's not dead-center. Depending on what you're lined up with and how, maybe that's a problem -- us raycasting from dead-center to the WEAPON node, such that the raycast is happening at a slight angle from the direction the player is facing. If that's the issue, we could perhaps use some basic trigonometry to offset the raycast position along the player's cross axis (i.e. "left/right") to match the WEAPON node's cross-axis offset, such that our raycast vector is exactly parallel to the player's main axis (i.e. "forward/backward"). Not sure I have the time to work on this right now -- I"m busy making some tools for modding the game -- but it's an idea to consider. Still -- can't say for certain whether this might help until I see your situation occurring myself.)
(EDIT: Diagram of the last paragraph, to aid my memory.)
https://www.nexusmods.com/skyrim/users/76743388
Vector diagram
I had a skeleton adjustment years back but some update broke it as a fix.
(looks back at years-old Skyrim installation with 240 mods) Oh dear. Work ahead it seems.
I'm on Skyrim SE so I want to know how can a noob like me fix this? What was the process of altering the raycast? Is is compatible with this AIM Fix mod: https://www.nexusmods.com/skyrimspecialedition/mods/18524 ?
Thank you again for your help!
Dejnov.
Well... i can't say the cause for what happens is the same, but it fits the description perfectly.
I usually encounter this problem, when going through the early stage of the game where you are sent by Jarl of Whiterun to fight your first dragon at the watchtower.
I always go on top of the watchtower, let the dragon start fighting the soldiers on the ground, and i shoot arrows at it from top of the tower.
Depending on position of the dragon, i often have to jump on top of the rampart to work around what seems to be exactly this problem.
So, here is hoping your fix will work for this problem in 1st person too.
In any case, thank you very much for this.
Also I think that arrows spawn differently in 1st person, because otherwise some really weird arrow teleporting or rubberbanding would happen when you fire a bow, since the bow is technically floating in the air, unlike it is in third person.
Based on the code I saw, nothing relevant changes between first- and third-person. Your position is the same value for both, and in both cases, the game uses the "WEAPON" node in your animation skeleton as the spawn location for the arrow. I specified third-person originally because the bug feels more obvious to me in that mode.