Forum rules - please read before posting.

First Person - Camera Follow Character Moves

Hi guys, 

I am new to Adventure Creator and I am going to use it to build an adventure game.
One quick question.

For example, if I use the First Person view, if my character does a backflip for example, will the camera follow the movement of the character's head?

I need it to look as if the player is actually doing the roll, to give the player the experience of doing a backflip.

If it doesn't, is there a way to do this?

Comments

  • If the character will have a body and you parent the camera to the character's head, then yes, it will most probably rotate with the character (if it's not constrained). Also, if you use an empty object then parent the camera to it and then animate the empty object to rotate, then yes it should follow it too, as far as I know. At least by regular Unity first person standards. But, I got to admit I've never used fist person with AC before so I'm not entirely sure how that will work. It depends on if the the camera is used differently, but I've never followed that tutorial. As an alternative you could also animate the camera instead, that way you wouldn't have the need for a player "body". you would probably need to disable player controls during the back flip though, or the controls would fight with the animation.
  • OK, thanks. I appreciate it. I guess i will try it soon :)
    But i wanted to be sure. 
  • Presumably you're looking for more than just a camera effect - you also want the player to move back (and perhaps jump during it as well), which means physically moving the root player gameobject.

    As traditional adventure games (which AC is designed for) don't normally have such mechanics, you'd have to add this on via a custom script.  Custom Actions can be written to let you run your own code within AC's ActionLists, meaning you could write a "do a backflip" Action and insert it into an ActiveList (an ActionList that runs when an input is presssed - see Section 2.14 of the Manual).  The Engine: Manage systems Action can be used to temporarily disable the Player system while you take control over the Player prefab.

    Alternatively, you could go further and implement a custom motion controller, which would allow you complete control over the way your Player moves (if you wanted to make a more robust jumping/movement system).

    These are more advanced topics, to be sure - @Alverik's suggestion may be just fine for your own needs, but I'm just letting you know of your options if you need something more.
  • edited August 2016
    Basically those are needed only for my cutscenes (where movement controls are mostly disabled anyway), but still I wanted to see if the camera follows the head movement. :D The backflip was just an example. 

  • Ah, I see.  The first person camera is parented to the player, but it's rotation is only updated locally - so if you rotate the player the camera should also turn with it.
  • So, if the player for example would fall on the ground, the camera view would show that right? 
  • That depends on what you mean by fall.  The camera is parented to the root player object - so if the player physically drops from a height, the camera will move with it.

    But if you want the camera to do something like momentarily look down at the ground to show the feeling of impact, or some other example where you as a designer control the first-person camera, you can create animations for these specific cases.

    You can do this by creating a GameObject with an Animator component, that sits between your root player object and your first-person camera object in the hierarchy. This will allow you to create animations for your camera without it inteferering with the rotation of the camera due to player movement, which you can then run using the Object: Animate Action.

    You should use this "in-between" object because the first-person camera can't turn left and right by itself - only up and down.  If you need the camera to face directly forward at the start of one of these animations, you can do so by calling the FirstPersonCamera component's SetPitch function with an angle value of zero.
  • OK, so I rigged the camera to the Head of the player. It does what i need, the problem is that now, when I run or walk, the camera movement is too big. I removed the Head Bob completely from the camera script, but i think the body movement is causing the camera to move. Is there a way to make it smoother and not move the camera so much as the head is moving? 

    I like the movement, but it is too intense...
  • If it's parented to the head, then changing the animation of the player will change the intensity of the camera.  Alternatively, you could have a separate bone in your player's rig that's used purely for the camera animation.
  • Yeah, i`m going to try modifying the animation, hopefully I can get it done :D
    I am using Mixamo for the animations...
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.