markys Posted December 26, 2023 Share Posted December 26, 2023 private void CameraPosition(){ vec3 targetPosition = cameraTarget.Position; vec3 camPosition = node.Position; if(Input.IsKeyPressed(Input.KEY.W)){ Log.Message("Input Key is Presseds"); camPosition = targetPosition; Log.Message("Camera Target Position. " + targetPosition + "/n"); Log.Message("Camera Position. " + camPosition + "/n"); } Log.Message("Camera Target Position. " + targetPosition + "/n"); Log.Message("Camera Position. " + camPosition + "/n"); } Link to comment
cash-metall Posted December 26, 2023 Share Posted December 26, 2023 if(Input.IsKeyPressed(Input.KEY.W)) { Log.Message("Input Key is Presseds"); camPosition = targetPosition; // camPosition - it is local varaible. you need to apply position back to node node.Position = camPosition; // apply position } 1 Link to comment
Recommended Posts