Jump to content

simsam

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by simsam

  1. are you using a gamepad? onkeypress works for the keyboard only, at the moment at least :(
  2. Thanks but i tried it already (as well as splinetranslateto and a couple of others). For some reason the rotation part doesnt get applied on the player (it works on other objects/npcs). Seems like it gets overwritten by something... I tried disabling playercontrols, but to no avail. Here's my update function, as you can see i tried all the functions I could find on creationkit.com. But since im new to modding, i hope i just missed a chapter... Event OnUpdate() ;trackcaster.StopTranslation() float pX = trackcaster.GetPositionX() float pY = trackcaster.GetPositionY() float pZ = trackcaster.GetPositionZ() float angleX = trackcaster.GetAngleX() float angleY = trackcaster.GetAngleY() float head = trackcaster.GetHeadingAngle(trackTarget) float angleZ = trackcaster.GetAngleZ() + head if math.Abs(head) > 0 ; trackcaster.TranslateTo(pX,pY,pZ, angleX, angleY, angleZ,20,200) trackcaster.SetAngle(angleX, angleY, angleZ) ; trackcaster.SplineTranslateTo(pX, pY, pZ,angleX,angleY,angleZ, 100, 100,100) endif ;trackcaster.SetHeadTracking(true) ;trackcaster.SetLookAt(tracktarget,true) RegisterForSingleUpdate(1) endEvent
  3. Hello, I'm trying to make some alternate controls for combat. Lock on a target and the player orients himself towards it. I tried manyyyyyyyyy different functions, all resulting in some problem. To boil it down my problem is that using player.setangleZ "teleports" the player to the new location, and breaks his animation (making him jiggly like a parkinsonian). So instead of "setting" the orientation, I am looking for a way to apply a force to that object (angular velocity), so the havok engine takes care of smoothly interpolating the view to the desired angle. I know this must sound like gibberish, so to put it plainly: What is the best method to reorient the player's camera or body toward a certain angle?
  4. Hi guys, I'm looking to make the combat style target centered (like a zelda). You push a button, it gets the best target and sets it as center of movement. I got the spell working and acquisition of the target alright but i cannot seem to find the proper way to orient the camera on it. I manage to do the exact opposite (npc will look at me and keep facing me while moving) using setlookat(target, true) But the player doesn't seem to accept that function. So i tried changing the player Z angle to face the target (GetHeadingAngle will return the angle to the target), and run that script every n seconds. It works fine for long time intervals. But when i go under 0.1, it gets very jumpy.... the same positions will result in different results........ does space and time get distorted in between frames? I did the math myself to ensure the getheadingangle wasn't bugged, and the same jumpiness happens when i lower the update interval. Does arc tangent have some divide by zero error? I'm wondering if any of you had this kind of problem before, and if there are camera controls that i missed (i am using player.setangle to orient the view, as i cannot find the camera object...) This is my first attempt at modding Skyrim, and these bugs are quite disappointing... Thanks for your help!
×
×
  • Create New...