Try waiting for one frame before capturing the image: https://github.com/godotengine/godot-demo-projects/blob/master/viewport/screen_capture/screen_capture.gd Author msc509 commented on Jan 3, 2021 Try waiting for one frame before capturing the image: https://github.com/godotengine/godot-demo...
RID vp = VS::get_singleton()->viewport_create(); VS::ViewportRect vr; vr.x=0; vr.y=0; vr.width=EditorSettings::get_singleton()->get("grid_map/preview_size"); vr.height=EditorSettings::get_singleton()->get("grid_map/preview_size"); VS::get_singleton()->viewport_set_rect(vp,...
Godot version 3.5 stable, 4.0 Alpha 15 System information Win Issue description In both Godot 3.5 stable and Godot 4 Alpha 15 (and earlier) if you try to get the Rect2 of a Sprite using get_rect(), the resulting Rect2() will have the cor...
custom_viewport = Object::cast_to<Viewport>(p_viewport);if(custom_viewport) { custom_viewport_id = custom_viewport->get_instance_id(); }else{ custom_viewport_id =0; }if(is_inside_tree()) {if(custom_viewport) viewport = custom_viewport;elseviewport = get_viewport(); RID vp = viewport...
图1 测试条件 图2 测试结果 图3是进行测试的文本文件及其内容,由于文件前段所 +7 分享回复赞 godot吧 戏法之手 请问viewpoint坐标如何转换map坐标请问get_viewport().get_mouse_position()的坐标如何转换成tielmap的坐标 godot 分享4赞 flash吧 贴片式T卡 【沁恒 CH32V208 开发板】+ U盘/ SD NAND读写与多...
uv_vscroll->set_max(rect.pos.y+rect.size.y); uv_vscroll->set_page(uv_edit_draw->get_size().y); uv_vscroll->set_val(uv_draw_ofs.y); uv_vscroll->set_step(0.001); updating_uv_scroll=false; } 开发者ID:AMG194,项目名称:godot,代码行数:45,代码来源:polygon_2d_editor_plugin.cpp...
Rect2 r =get_script_instance()->call("_get_item_rect",NULL,0,err);if(err.error==Variant::CallError::CALL_OK)returnr; }returnRect2(Point2(-32,-32),Size2(64,64)); } 开发者ID:Ragar0ck,项目名称:godot,代码行数:10,代码来源:node_2d.cpp ...
get_viewport()->_listener_remove(this); }break; } } 开发者ID:93i,项目名称:godot,代码行数:29,代码来源:listener.cpp 示例2: test_addNodeInTree_NullIn ▲点赞 5▼ staticvoidtest_addNodeInTree_NullIn(){ before(); GNode *tree =NULL; ...
draw_texture_rect(c->get_texture(), Rect2(Vector2(), get_size() * Size2(1,-1)));elsedraw_texture_rect(c->get_texture(), Rect2(Vector2(), c->get_size() * Size2(1,-1))); } } } 开发者ID:93i,项目名称:godot,代码行数:47,代码来源:viewport_container.cpp ...
Rect2 r =get_script_instance()->call("_get_item_rect",NULL,0,err);if(err.error==Variant::CallError::CALL_OK)returnr; }returnRect2(Point2(-32,-32),Size2(64,64)); } 开发者ID:Ragar0ck,项目名称:godot,代码行数:10,代码来源:node_2d.cpp ...