playMaker

Author Topic: Forcing the camera to look at the character [Oculus Rift]  (Read 671 times)

fuzzywobs

  • Playmaker Newbie
  • *
  • Posts: 25
    • View Profile
Forcing the camera to look at the character [Oculus Rift]
« on: May 24, 2015, 02:51:40 PM »
My character is controlled via third person cameras (several oculus cameras) and when the character gets to certain areas/triggers, the different corresponding cameras activate/deactivate to ensure a constant good line of sight.


So far I have everything running ok-ish. However, one issue I have is that when the camera changes (when a new one activates) it always seems to be pointing in a random location (depending on where the player happens to be looking at that moment in time) and it takes a few seconds to even find where the character is by looking around.

What I am trying to do is that when the camera changes, the camera that activates always starts off on a position that is looking right at the character, regardless of what direction the player is looking.


So I have been experimenting all day and have come close many times. However I tried to restart from scratch, and now I cant even achieve what I managed to achieve earlier! I feel like I'm having a brain fart!, and its very frustrating!


The way I was trying to achieve and had gotten most of the way there (and now I can recreate ) was using the following method:


1. Have all the cameras be forced to "look.at" the character at all times.
2. When a camera is activated, the script on that particular camera forcing it to "look.at" the character is disabled after one frame.

This should cause the camera to start off looking at the character, and after one frame allowing the player to look whereever they want.

I'm just struggling to force the camera to look at the player. It is really rage inducing knowing I achieved it earlier but cannot do it anymore.