playMaker

Author Topic: Camera Pan and Rotate  (Read 1086 times)

Vern_S

  • Playmaker Newbie
  • *
  • Posts: 32
    • View Profile
Camera Pan and Rotate
« on: April 25, 2015, 09:00:01 AM »
Hello,

I am setting up a simple Orbit Cam with panning using EasyTouch, PlayMaker, and DevandArt's PM Actions asset. I basically have a cube with the swipe to change it's position and twist to rotate it. (See DragCamera and TwistCube DevandArt example scenes since I basically have both of these applied to one cube.) I mapped the swipe Vector2 Y to Vector3 Z in order to move the cube along it's X and Y axis. I mapped the cubeAngle to Y in order to rotate the cube on it's Y axis. I have a camera with a Smooth Follow Action on it with the cube as the target object.

Everything works great until I rotate the cube. Swipe moves the cube in relation to the world and not the cubes current orientation. For example, if I rotate the cube 180 degrees then the swipe motion has the opposite effect. Swipe right object moves left. Changing the Get Position and Set Position Actions Space from World to Self or any combination of these values has no effect.

I need to have a solution that will position the cube using it's local orientation. For example. A swipe up will always move the cube along it's positive Z axis and a swipe right will move the cube along it's positive X axis

Any help would be greatly appreciated.  :)