Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: kierenhovasapian on May 26, 2015, 11:23:05 PM
-
Hi Everyone,
I have a pretty firm knowledge of Playmaker however I am having a problem with a camera lock on idea.
Basically I want my 3rd person camera that I have working perfectly fine to move higher over the player and include in the frame at all times the locked on enemy.
Game layout in steps:
- Player walks up to enemy (third person camera)
- Enemy runs up to Player *Breaks distance barrier*
- Player's Camera, lifts up higher to include enemy and player in frame
- player runs out of distance barrier or kills enemy.
- reset camera position. repeat from step one.
The camera system I imagine is quite similar to that found in the Batman Arkham games, 3rd person to lifted 3rd person with enemies included.
The hard part I can't figure out is how to raise the camera based of the position.
Would I use a blank game object - with a find gameobject "enemy" tag, then set a look at to look at enemy while raycasting for a test distance, and then set a float to test if it's under a certain value trigger camera to raise...
I hope someone understands what I mean.
Cheers and hope to help out the community here too with your own questions!
-
If I understand,you should you something to translate from a vector 3.So make 1 object up where you want and store a vector 3.Every time you want your camera to move,just make it move to this vector 3.
-
Ah okay, So place a gameobject to where the camera should move and then use a get position and store vector 3. Then possibly ITween the camera between the two points - one point for 3rd person and one for the fighting / action camera.
That would work I think! I'll test and report back later.