SCR_WaypointPrefabLocation should receive a checkbox that makes the waypoint location relative to the AI group.
Description
Description
Details
Details
- Severity
- Tweak
- Resolution
- Open
- Reproducibility
- N/A
- Operating System
- Windows 10
- Category
- General
Additional Information
This would be very useful for setting up automated waypoints, for example it could be used to make an AI group immediately defend the location it is spawned at, or follow a local patrol pattern.
Implementation is very simple and only takes a minute:
- Add this attribute to SCR_WaypointPrefabLocation:
[Attribute("0", UIWidgets.CheckBox, "Is location relative")] bool m_bIsRelative;
- Add this instruction to SCR_AIGroup::AddWaypointsDynamic(), line 1370:
if (prefabs[i].m_bIsRelative) mat[3] = mat[3] + GetOrigin();
Optionally, you could rotate mat[3] by GetAngles() before adding GetOrigin().