Movingthe camera by it's position?

Hey guys I hate to ask this, but I’m the worst when it comes to transforms, what’s the proper way to handle movement with my joystick ThumbArea along it’s own rotation (Not world space, when the joystick is +up the camera moves in the forward direction, etc) with this code?

                ThumbArea.translateTransform = BABYLON.Vector3.TransformCoordinates(new BABYLON.Vector3(ThumbArea.xAddPos / 3000, 0, ThumbArea.yAddPos / 3000), BABYLON.Matrix.RotationY(scene.activeCamera.rotation.y));

Would it be possible to get a more information on what you’re trying to do? For example, are you just trying to get something to rotate/move with input from a joystick, using its location as the point of reference? I’m not sure I quite understand what you’re asking.

My current code is using a single virtual joystick ThumbArea to move the camera in world space, what I’m trying to do is move it in the direction the cameras facing or local transforms. Currently when you move the joystick in the up position the camera moves forward in the direction it’s facing not z forward in world space, I’d like to switch that.

FFs, it’s literally scene.activeCamera.position.addInPlace(ThumbArea.translateTransform);

Thanks for your help Polygonal!

But Now I’m able to walk through walls, that was not entirely the solution, anyone know the solution to keep physics?

You could try creating a mesh to work as a bounding box that moves with your camera and check for collisions against that. You might have to add code to handle said collisions though (like intersectMesh)

The camera rig already contains a collider, when I update the position it doens’t take into account physics, so I’m back to my original question, “How can I update the local position”