diff options
| author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-07 14:53:01 +0100 | 
|---|---|---|
| committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-07 14:53:01 +0100 | 
| commit | 5c3ce63558f2d5dec06a124773f910d783bb22aa (patch) | |
| tree | 77402408eaba5dab3fb5064628dad1a5fd2be0f1 /src/crepe/system/InputSystem.cpp | |
| parent | 1e9e564f3806d07c7b0dc445c4ae2e738350fc83 (diff) | |
| parent | fdb4c99e139a264d4e15e6913a3756fc6cccb2f2 (diff) | |
merge master
Diffstat (limited to 'src/crepe/system/InputSystem.cpp')
| -rw-r--r-- | src/crepe/system/InputSystem.cpp | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/src/crepe/system/InputSystem.cpp b/src/crepe/system/InputSystem.cpp index 7cc8d30..aaa8bdf 100644 --- a/src/crepe/system/InputSystem.cpp +++ b/src/crepe/system/InputSystem.cpp @@ -24,10 +24,10 @@ void InputSystem::update() {  	RefVector<Transform> transform_vec  		= mgr.get_components_by_id<Transform>(current_cam.game_object_id);  	Transform & cam_transform = transform_vec.front().get(); -	int camera_origin_x -		= cam_transform.position.x + current_cam.offset.x - (current_cam.viewport_size.x / 2); -	int camera_origin_y -		= cam_transform.position.y + current_cam.offset.y - (current_cam.viewport_size.y / 2); +	int camera_origin_x = cam_transform.position.x + current_cam.data.postion_offset.x +						  - (current_cam.viewport_size.x / 2); +	int camera_origin_y = cam_transform.position.y + current_cam.data.postion_offset.y +						  - (current_cam.viewport_size.y / 2);  	for (const SDLContext::EventData & event : event_list) {  		int world_mouse_x = event.mouse_position.x + camera_origin_x;  |