Changed default perspective camera far plane | Added string support when copying entities.

This commit is contained in:
2025-04-02 23:36:05 +02:00
parent 06995fbd05
commit 3fa4de1578
2 changed files with 4 additions and 1 deletions

View File

@@ -35,7 +35,7 @@ Camera :: struct {
dirty : bool;
}
create_perspective_camera :: (position: Vector3 = .{}, fov: float, aspect: float, yaw: float = 0.0, pitch: float = 0.0, roll: float = 0.0, z_near: float = 0.1, z_far: float = 100.0) -> Camera {
create_perspective_camera :: (position: Vector3 = .{}, fov: float, aspect: float, yaw: float = 0.0, pitch: float = 0.0, roll: float = 0.0, z_near: float = 0.1, z_far: float = 1000.0) -> Camera {
camera : Camera;
camera.type = .PERSPECTIVE;
camera.world_up = .{0,1,0};

View File

@@ -394,6 +394,9 @@ generate_member_copy :: (type: *Type_Info_Struct, builder: *String_Builder, path
case .INTEGER; {
print_to_builder(builder, "\tcopy.% = e.%;\n", new_path, new_path);
}
case .STRING; {
print_to_builder(builder, "\tcopy.% = copy_string(e.%,,allocator=e.scene.allocator);\n", new_path, new_path);
}
}
}
}