Jump to content

Recommended Posts

Posted (edited)

For a spy item I'm trying to make for my mod I want to set the camera target to the targeted npc to simulate remote viewing. Player just gets 3rd person view controls and target actor should continue on whatever they were doing.

From skyrim I'm used to using Game.SetCameraTarget(targetnpc) and that results in a 3rd person orbiting cam around the npc. Bam, done.

 

In fallout I get a CTD If use just Game.SetCameraTarget(targetnpc)

If I add:

targetnpc.setplayercontrols(true/false doesnt matter, both yield same result)
targetnpc.enableAI(True)

it does not crash, but drops the camera about 100 units from the targetnpc root and forces it to face one direction. Now follows the npc at least though.

 

I'm more than a bit puzzled, there's not a lot more I can do with setcameratarget I think.

Anyone have an idea how I should deal with this?

Edited by Cobal
  • 2 months later...
Posted

Did you try to ForceFirstPerson() and then ForceThirdPerson() in order for camera to attach to the new npc? What is the distance between player and this npc when you use this command? In F4 the game reloads the worldspace (or cell) if you teleport player further then 200 units. When camera is linked to some other npc rather than the player, such teleportation may result in a very odd behavior because you (the player) become unloaded.

 

At least this is my thought.

Posted

This helps! Using ForceFirstPerson() and then ForceThirdPerson() allows me to have control over the rotation of the camera. However, the camera is still a fixed distance away from the NPC unless its movement is blocked by terrain. I would normally use the scroll wheel to zoom in but cannot in this case. Is there any other way to reduce the camera distance?

  • Recently Browsing   0 members

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