You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Portals - Allow user to set roaming expansion margin
Previously a crude metric was used to decide on the roaming expansion margin, but it created unexpected results in some scenarios. Instead this setting is exposed to the user via the RoomManager, allowing them to tailor it to the world size, room sizes, roaming objects sizes and the speeds of movement.
This commit is contained in:
@@ -1346,10 +1346,10 @@ void VisualServerScene::rooms_set_active(RID p_scenario, bool p_active) {
|
||||
scenario->_portal_renderer.rooms_set_active(p_active);
|
||||
}
|
||||
|
||||
void VisualServerScene::rooms_set_params(RID p_scenario, int p_portal_depth_limit) {
|
||||
void VisualServerScene::rooms_set_params(RID p_scenario, int p_portal_depth_limit, real_t p_roaming_expansion_margin) {
|
||||
Scenario *scenario = scenario_owner.getornull(p_scenario);
|
||||
ERR_FAIL_COND(!scenario);
|
||||
scenario->_portal_renderer.rooms_set_params(p_portal_depth_limit);
|
||||
scenario->_portal_renderer.rooms_set_params(p_portal_depth_limit, p_roaming_expansion_margin);
|
||||
}
|
||||
|
||||
void VisualServerScene::rooms_set_debug_feature(RID p_scenario, VisualServer::RoomsDebugFeature p_feature, bool p_active) {
|
||||
|
||||
Reference in New Issue
Block a user