Force the Player to Look

Post » Sun Nov 18, 2012 10:27 am

Hi there!

I'm having trouble now getting the player to lock on to a particular sight. I'd like to have them be forced to look at something for a few seconds. If the camera could zoom in a bit on the thing I'd like them to look at that'd be even better.

My current, sloppy, workaround is to use setAngle and disablePlayerControls. This is...unfortunate and as the game uses this effect numerous times I know there has to be a better process. SetCameraTarget seemed like it would be what I needed but in practice it only makes the player's camera unable to move up and down. Wonky to say the least.

How does the game generally force a player to watch a scene or see a sight?
User avatar
Nicholas C
 
Posts: 3489
Joined: Tue Aug 07, 2007 8:20 am

Post » Sun Nov 18, 2012 6:58 am

As far as I know, Vanilla uses the method you describe.

DisablePlayerControls
MovePlayer (there is no camera)

The execution scene (at game start) - and any others I can currently bring to mind - works that way.
User avatar
Manuel rivera
 
Posts: 3395
Joined: Mon Sep 10, 2007 4:12 pm

Post » Sun Nov 18, 2012 9:51 am

i wrote a script and posted it here in the forums, for a "possession spell" that is converted to a user or programmable flying camera
User avatar
flora
 
Posts: 3479
Joined: Fri Jun 23, 2006 1:48 am

Post » Sun Nov 18, 2012 9:12 am

h4vent, I'm not sure I'm clear on MovePlayer. That doesn't seem to be a command. Are you just saying that, "yes angling the player reference is the only way to manipulate the player's viewport"?

AD, that seems like an equally "unclean" way of going about things, its definitely more than I need. My only purpose is to make the player notice something, like the scripted dragon encounters in the game. Unfortunately I'm too much of a noob to isolate where in the pre-made quests that's happening and thus deconstruct it. It seems like there may be a command that basically grabs the players viewport and orients it on something for a limited period of time...

This is something that is done frequently in Vanilla.

Edit: One of my biggest issues with SetAngle is that the player isn't necessarily in one place, he could be in any number of locations and that makes it hard to guarantee that the angle I set will have him rotated towards the location I want him to see. It works....roughly right now but only very roughly.
User avatar
Samantha Pattison
 
Posts: 3407
Joined: Sat Oct 28, 2006 8:19 pm

Post » Sat Nov 17, 2012 9:35 pm

Looking at the dragon in the execution scene ... Works because that is part of a SCENE.

It's easy to do, in a scene, because you have a look command (kinda) that - coupled with disabling player controls - makes the player look up at the dragon.

If you start a new game and play through Helgen you can, at all times, look around ... but sometimes your view is pulled to a particular place ... So you can disable controls, but leave "LookAround" enabled and still - in a scene - direct the player's view

If you are trying to do this without a scene then, as far as I know, SetAngle is the only way forward (and yes, the maths to make that work is hard ... You need advice from one of the code-gurus on here if you are struggling with that ... passed 2+2, my math is rubbish!)
User avatar
Darlene DIllow
 
Posts: 3403
Joined: Fri Oct 26, 2007 5:34 am


Return to V - Skyrim