playMaker

Author Topic: Camera to follow object on input Axis [SOLVED]  (Read 3552 times)

coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Camera to follow object on input Axis [SOLVED]
« on: December 17, 2013, 05:07:08 PM »
Hi

I need to get a camera to follow a input Axis based on a rotation. I have the following setup (screenshot attached) and have included a transform direction (top of screenshot) for testing but not sure where to go from here.

Setup.
I get the Axis and store it. (I specify the Multiplier to 1.)
I use Float Multiply to get the desired X number.
I rotate based upon the SideWay Input.

I can see the object rotates but doesnt take the camera with it.

thanks

Nick
« Last Edit: December 20, 2013, 03:24:34 AM by coxy17 »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Camera to follow object on input Axis
« Reply #1 on: December 17, 2013, 05:26:47 PM »
This FSM is not on the camera?

You only need Get Axis and Rotate, but Rotate is pointing at the Owner object. What is the Transform Direction action for? Is the Camera a child of this FSM Owner?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Re: Camera to follow object on input Axis
« Reply #2 on: December 18, 2013, 03:09:53 AM »
Hi Lane,

Sorry should of explained further. I have this setup on the player and the camera separately (not child). The setup ive attached now is what 'Jean Fabre' provided me with a demo from another topic. I want to separate out the Horizontal and Vertical input Axis movements. But got to the point of the first screenshot to get a left turn.

What im after
3 seperate FSM for each axis. (left, right and forward) and to control them with keyboard key other than the standard input keys.

Thanks

Nick
« Last Edit: December 18, 2013, 07:40:11 AM by coxy17 »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Camera to follow object on input Axis
« Reply #3 on: December 18, 2013, 09:12:34 AM »
Get Axis returns positive and negative values, just assign a Positive and Negative key in the Input Manager, call that pref in Get Axis, store it and Add Force/Translate every frame with the Get Axis result for Left and Right.

So you only need a Horizontal Get Axis+Add Force and a Vertical Get Axis+Add Force.

Forward can be handled by Get Axis+Add Force as well, just use it on Z(self) with a another Input.

From what you're explaining it just looks like your stack is overcomplicated to accomplish what you want, unless I'm just misunderstanding.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Re: Camera to follow object on input Axis
« Reply #4 on: December 18, 2013, 09:40:53 AM »
Hi,

You are not far away, I can rotate now just that i need the camera to follow with a slight delay to the players movement (last screenshot).

It works with the combination in the screenshot i added. So need to essentially separate it out into vertical and horizontal BUT keep the camera following. No worries if you are struggling to understand me.

Was hoping Jean would comment as i was recently talking to him about it in another topic before moving it here.

Nick

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Camera to follow object on input Axis
« Reply #5 on: December 18, 2013, 09:46:43 AM »
Do you have any examples of what you're trying to make? Like a YouTube video?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Re: Camera to follow object on input Axis [SOLVED]
« Reply #6 on: December 20, 2013, 03:22:56 AM »
Its ok now, i have just Transformed Rotate and used what you advised its working ok now thanks.  :) Must of been over complicating it.