Playmaker Forum

PlayMaker News => General Discussion => Topic started by: Vern_S on April 25, 2015, 12:00:01 PM

Title: Camera Pan and Rotate
Post by: Vern_S on April 25, 2015, 12:00:01 PM
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.  :)