playMaker

Author Topic: Look Away?  (Read 1696 times)

wetcircuit

  • Full Member
  • ***
  • Posts: 158
    • wetcircuit.com
Look Away?
« on: March 10, 2015, 06:22:01 PM »
Ok, I am stuck so turning to community for help.

I need to "Smooth Look Away" from an object. Just like "Smooth Look At" but the opposite... I've gone round and round and I am just not getting it. I think I don't understand the math?

my "player" and the object are both Y=0. I think I need to get the angle by tan(x/z)... I honestly did not take trigonometry, lol. I don't know if this is correct.

How would you go about this? I am feeling very mathdumb and frustrated at the moment. Maybe I am overthinking it, and there is an another way?
« Last Edit: March 10, 2015, 06:46:27 PM by wetcircuit »

TheBadFeeling

  • Junior Playmaker
  • **
  • Posts: 66
Re: Look Away?
« Reply #1 on: March 11, 2015, 03:46:14 AM »
I'm not too math about things either, so I can't help you there --- but in my current project I've done something similar to what you are describing. Though this is a rather static approach, it gets the job done for me.

I simply feed a Vector3 variable to the script. I do a simple Vector3 Add XYZ and add a given value to the object's position. That way I can focus my camera on a position away from the object.

/Bad
The Force is with you, young Playmaker – but you are not a C# senpai yet.