playMaker

Author Topic: Set Camera to different spot.  (Read 382 times)

kentcheung2000

  • Playmaker Newbie
  • *
  • Posts: 37
    • View Profile
Set Camera to different spot.
« on: January 23, 2019, 11:44:31 AM »
I like to set the player to  3 players.  One at a time. How do it make it happen smoothly?

Thanks.

Kent

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4615
    • View Profile
    • jinxtergames
Re: Set Camera to different spot.
« Reply #1 on: January 23, 2019, 09:35:33 PM »
Hi.
You can tween to move the camera or maybe with cinemachine.

for a quick test you can use Vector3 interpolate (maybe it's even good enough for you).

Lets say you want the camera to move from player 1 to player 2 :

Get position from player 1 and from player 2

Vector3 interpolate set player 1 position in From Vector and player 2 position in To Vector.
Time is the duration.
you can also change the mode, but there are only 2 mode at the moment on this action.