Jump to content

Please help getting started on lookat while in mouselook


Kitiara Galicia
 Share

You are about to reply to a thread that has been inactive for 163 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I have a very basic understanding of scripting but camera control seems to be beyond me at the moment.

I was hoping someone could get me started on a script that will point the camera at an object while in mouselook.  I have found a few scripts that I tried to adjust, but they all seem to only work on regular 3rd person views.

my basic understanding is I need to get the objects location, figure out it's direction in relation to my avatar and then set the camera rotation to keep me looking in that direction.

Link to comment
Share on other sites

unfortunately, scripted camera control doesn't work while in mouselook. The best you could do is to move the camera to a bit above the position of your avatar, and then set the look at point to the position of the target. If you do this very fast it should more-or less give you the effect you want, but it's rather inefficient, and will look a bit off to anyone with a framerate faster than the update speed (which can only go up to ~45fps)

Might be of some use :

 

Edited by Quistess Alpha
Link to comment
Share on other sites

Hmm. I do know there has to be some way. I know of a couple items involving RLV that can in fact force someone into ML (that part I can do) but once in mouselook, they do force the wearer to look only at a selected object or a selected avatar. 
 

the problem I found with what you suggested, is that while it simulates the view of mouselook, the camera is detached and not controlled by the mouse. I know that sounds like exactly what I want, but there is something different about the feeling when you can still move the mouse, have it slightly adjust the view only to have it forced back to the target view. 

Link to comment
Share on other sites

as a caution to others who might try and play around to figure out this might work, Do not attempt to rapidly enter and exit mouselook on a fast timer: constant re-centering of the mouse pointer makes the viewer unusable. (also FWIW, you always enter mouselook looking perfectly horizontal).

ETA: The only RLV product I know of that offers something similar to this functionality doesn't actually let you go into mouselook as far as I can tell, so I'm out of leads. using the @setrot command can change the facing direction while in mouselook, and will force the up/down angle of your vision to perfectly level.. roughly:

vector delta = target_pos-my_pos;
float angle = llAtan2(delta.x,delta.y); // apparently RLV uses clock angles rather than math angles.
llOwnerSay("@setrot:"+(string)angle+"=force");

(untested)

Edited by Quistess Alpha
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 163 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...