elseagoat Posted February 26, 2013 Share Posted February 26, 2013 I am trying to write a script using some simple dynamics equations to predict the location where the player will strike with a bow before the projectile will actually hit. The problem is that I cant figure out what the numbers represent. In the projectile form, arrows are listed as having a velocity of 3600, and a "gravity" of 0.35. 0.35 what? 0.35% of maximum? What is the maximum acceleration due to gravity? What is 3600? 3600 units/second? inches/min? feet/month? light years/(billion years)? elephants? I have a tester script which measures the angles of the player. The angles I am assuming are in degrees and not radians. It also measures distance traveled by the arrow in all 3 directions, and the time it took for the arrow to land. The time is in seconds. But what is the distance? Units? Is that what "GetPositionX()" returns? A value in units along that axis? Can anyone help with this craziness? Link to comment Share on other sites More sharing options...
dfac364 Posted February 27, 2013 Share Posted February 27, 2013 (edited) im not sure how skyrim measures its distance as ive run into this confusion before, one way i know of that you could figure this out would be to make a forcegreet package and set the range to 1 or 10 or whatever (10 might be better from what ive seen) and than look at it in the ck, from there im guessing from your above post that you can handle getting the other dimensions Edited February 27, 2013 by dfac364 Link to comment Share on other sites More sharing options...
elseagoat Posted February 27, 2013 Author Share Posted February 27, 2013 (edited) im not sure how skyrim measures its distance as ive run into this confusion before, one way i know of that you could figure this out would be to make a forcegreet package and set the range to 1 or 10 or whatever (10 might be better from what ive seen) and than look at it in the ck, from there im guessing from your above post that you can handle getting the other dimensionsThe acceleration is my biggest problem. I tried making a script which when cast, creates an activator at a random position in the sky. This activator records its x,y,z location in space, then casts a spell and records the time of cast before deleting itself. This spell fires a projectile which has zero velocity and 0.35 gravity, consequently it falls directly to the ground. When it hits, it creates another activator at that point which immediately records the time it was created, and then marks down its position. Once all this information is recorded, it is plugged into this formula in a script and the result is given to me: A=(2(Zt-Zo))/(T^2) where A is acceleration, Zt is the Z position at time T, and Zo is the initial Z position. The problem is that I get a result which varies between -215 and -240 for that value, which I believe to be in units of game units per second squared as the positions are measured in units of game units. This is likely due to papyrus sucking and not being able to precisely record the times the spell is fired and when it hits solid ground. Does anyone out there know the exact value of the negative z acceleration applied to all havok enabled objects in this game? If papyrus is just being slow, my best bet is to drop the projectile from very very high to get a more accurate reading, as the percentage that the time is off due to papyrus being slow will be small compared to the total time. Edited February 27, 2013 by elseagoat Link to comment Share on other sites More sharing options...
elseagoat Posted February 27, 2013 Author Share Posted February 27, 2013 (edited) But also, I have no idea what you are talking about with that forcegreet thing. I have never actually placed anything in the actual game world, only made mods entirely with scripts and forms. I also fail massively when it comes to packages, I can never get them to do what I want. Edited February 27, 2013 by elseagoat Link to comment Share on other sites More sharing options...
elseagoat Posted February 27, 2013 Author Share Posted February 27, 2013 Bump, I really need help here. I just need some trick to find the coordinates of an arrow when it hits an actor which is the only reason I am doing this, but I need to do it without modifying the arrow itself. Link to comment Share on other sites More sharing options...
starfire42 Posted March 5, 2013 Share Posted March 5, 2013 You might want to check out the momentum module in Dragon Combat Overhaul (http://skyrim.nexusmods.com/mods/32597/) and see how Apollodown did something similar with dragons. Link to comment Share on other sites More sharing options...
Recommended Posts