Ok, I am running UT2004 lastest patch.
I am trying to make my behind view aiming more accurate. The problem is my pawns vary between 1.5-3 times the normal pawn size. I have worked out spawning, crouching and collision issues, but am having problems with the behind view aiming.
Because my pawns are oversized, I have to move the camera up in behind view using the variable CameraMoveUp. If I move the camera up 50 units, then the projectile hits 50 units below the crosshair. The line from the camera to the crosshair is parallel to the projectile path, but 50 units higher
So In the AdjustAim function, in the two behindview areas I did this:
This works pretty good, it works fine if you are facing forward, but if you look down, the projectile hits a little too low, and if you look up the projectile hits a little high. Does anyone have any ideas that might help? I have actually done this about 5 different ways, and I always get the same result.Code:if (Vehicle(Pawn) != None || bBehindView !=true) { return Rotation; } else{ //this is the Original Camera Location Start=OriginalCamera; //this is where I moved it up to Start.Z=OriginalCamera.Z + CameraMoveUp; //now I trace from my adjusted camera location straight forward in the fire direction HitActor=Trace(HitLocation, HitNormal, Start + 4000 * FireDir, Start, true ); //and now trace from the projstart location to the HitLocation from the previous trace HitActor=Trace(HitLocation2, HitNormal, HitLocation, projStart, true ); ///get the original rotation NewRotationStuff=Rotation; ///change that last hit location to a rotation NewRotationStuffTemp=rotator(HitLocation2); now rotate up to that location NewRotationStuff.Roll=NewRotationStuffTemp.Roll; return NewRotationStuff; }
I know Mr. Evil has accomplished this, but he didnt do it in AdjustAim function, and I dont think he moved the camera up and I feel certain that it can be done similar to the way I have done it but with better accuracy.
This is the last obstacle I need to overcome to release my mod. Any help would be greatly appreciated.



Reply With Quote

Bookmarks