-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sites: Estimate terrain objects bounding box overlap with site for hiding rocks etc #181
base: development
Are you sure you want to change the base?
Conversation
…ding rocks etc. TL;DR stop mortars spawning inside rocks by removing ROCK/ROCKS/HIDE terrain objects with a bounding box estiamtion. Estimates whether nearby terrain objects will overlap/intersect with the spawned site, then hides them. Also hides any terrain objects directly on top of those found with bounding box search, otherwise we end up with a bunch of floating bushes. Can be expanded to other kinds of terrain objects on a per site basis. Requires more testing on my end for both functionality and performance ... so putting up as a draft PR for now.
Please can someone confirm that Did a $ find . -name "*.sqf" -exec grep -Hn 'call para_s_fnc_profile_db' {} \; | grep sites
./mission/functions/systems/sites/fn_sites_load.sqf:19:(["GET", "sites", []] call para_s_fnc_profile_db) params ["","_sitesData"]; |
}; | ||
}; | ||
|
||
_objsIntersectTerrainObjectsBBox |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀 this is definitely wrong and needs fixing.
private _pos = [_center, _sizeMax / 4, _sizeMax / 2] call _fnc_findPos; | ||
|
||
[_pos] call vn_mf_fnc_sites_create_aa_site; | ||
[_pos, 5] call vn_mf_fnc_sites_hide_terrain_objects_bbox_intersections; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this part of MF code scheduled? If it is you should hide terrain objects before spawning.
TL;DR stop mortars spawned inside rocks soft locking a zone by removing ROCK/ROCKS/HIDE terrain objects with a bounding box estimation.
Estimates whether nearby terrain objects will overlap/intersect with the spawned site, then hides them. Also hides any terrain objects directly on top of those found with bounding box search, otherwise we end up with a bunch of floating bushes. Can be expanded to other kinds of terrain objects on a per site basis.
Requires more testing on my end for both functionality and performance ... so putting up as a draft PR for now.
TODO
getDir
on terrain objects to more accurately calculate overlap/intersections (rectangular area instead of circular?)clippingType
argument forboundingBoxReal
https://community.bistudio.com/wiki/boundingBoxRealscreenshots
notes about screenshots
_siteRadius
for this example would have been 15, not 5.nearestTerrainObjects
might want yet another bounding box calculationdebug markers
terrain hiding