Jump to content

Player camera controls


Recommended Posts

I am trying to make the damned player face a specific target but nothing I've tried will work at all. I've disabled player controls and I've tried to translateto and the game will move the player to that axis point but will not rotate the view to the target which is the part I really need to actually happen. Could care less about them moving to the spot really. I haven't tried setangle because A it would happen instantly, same with MoveTo and that would just look weird and the SetLook function only works on NPC's so where does that leave me? Any ideas? Thanks. Would TranslateToRef possibly work? and have them move to a markerheading that's angled properly?

Link to comment
Share on other sites

Not sure that answers your question as it's not a camera function, but if you want your player to face a specific target and that target is another NPC or a nearby door or objet, 'SetLookAt(ObjectReference akTarget, bool abPathingLookAt = false) works fine on the player - a little too fine actually, the player really looks like he's staring at the target so you musn't forget to cast ClearLookAt() afterwards. http://www.creationkit.com/SetLookAt_-_Actor

 

If you've tried it and it doesn't work, it's possible you may need to wait a bit before you cast it if it comes after another function. But in my experience, I never could get the PathToReference(...) to work...

 

As for controlling camera, I'm still trying to find my way through it at the moment, sorry.

Link to comment
Share on other sites

Yes I got it to work after a sendAnimationEvent(...) then adding a Utility.Wait(0.2) - I can't say for sure that the animation event mattered (in case it did and you don't need one, you could always use "IdelDefaultState" which doesn't do anything except restore default idle). But in my case the wait mattered, without it it didn't work. The SetLookAt(...) also worked while the anim was playing.

 

My target was not much farther than 70 or 100 units from the player though, I don't know if distance matters. I seem to remember it also worked on NPCs but in that case I had to call SetRestrained() to keep them from idling around while still staring at the target over their shoulder.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...