Commit Graph

205 Commits

Author SHA1 Message Date
rgba16f 74f474aae2 Add unit tests for the ViewportScreen ndc <-> worldspace utility functions (#1149)
Add ScreenNdcToWorld function to enable round trip testing.
2021-06-04 18:02:09 -05:00
AMZN-koppersr febf53671e Addressed PR feedback. 2021-06-04 11:09:44 -07:00
AMZN-koppersr ce7b81e2e7 Merge branch 'main' into SpawnableEntityIdMapping 2021-06-04 10:11:47 -07:00
lumberyard-employee-dm 4a1d713227 Fix recursive attempts to open the log file in the GameLauncher (#1114)
* Fix recursive attempts to open the log file in the GameLauncher

The AzFramework Application has been updated to default the @user@ and
@log@ aliases to the <engine-root>/user and <engine-root>/user/log
folder respectively if a project isn't set.

Fixed the SystemFile class to support negative offsets if Seek() as per
standard seek function such as fseek

Updated the CrySystem CLog class to use SystemFile instead of FileIOBase
to avoid any asserts that would cause CLog::OpenFile to be recursively
called infinitely

* Removing unused Force Closed variable

* AZ::IO::SystemFile build fixes for Unix platforms. Added a copy constructor for LUAEditorContextInterface.h to fix the LuaEditor build

* Adding missing includes to the WindowsAPI and Android SystemFile headers
2021-06-03 22:36:34 -05:00
AMZN-koppersr 1e7ac60949 Reintroduced spawning multiple instances of the same entity
The following was changed:
- The remapper in AZ::IdUtils now has an additional argument to tell it what to do when it encounters the same source entity id. The original behavior of ignoring the new entity id and returning the first occurrence is the default. The alternative behavior is to store the last known entity id and return that instead.
- Split the optional arguments for SpawnAllEntities and SpawnEntities.
- SpawnEntities now has an option to continue with the entity mapping from a previous spawn call or to start with a fresh mapping. The latter is the default as the former will come at a performance cost since the mapping table has to be reconstructed.
- Entities spawned using SpawnEntities and ReloadEntities now also get the correct entity mapping applied.
- Added several new unit tests to cover most of the new functionality.
- Fixed some places where the older API version was still called.
2021-06-03 10:56:34 -07:00
AMZN-koppersr 8c541b5205 Moved default values to object in the Spawnable Entities Interface 2021-06-03 10:56:30 -07:00
AMZN-koppersr 1bf8c599e3 External Serialize Context for spawning
This change makes it possible to provide a Serialize Context for spawning entities from spawnables. This also removes the need for the Serialize Context to be retrieved multiple times per frame.
2021-06-03 10:56:26 -07:00
Esteban Papp 29c71b4e53 SPEC-2513 Fixes to enable w4701 (#1105)
* Some fixes

* more fixes

* fixes for debug
2021-06-03 09:30:33 -07:00
Vincent Liu dfd63737c3 [SPEC-6720] Update session common interfaces (#956) 2021-06-01 15:59:43 -07:00
Alex Peterson afe20906db Add Project Manager File menu options to Editor 2021-06-01 15:30:14 -07:00
AMZN-koppersr b32507bd4b Merge pull request #973 from aws-lumberyard-dev/SpawnablePriorityQueue
Spawnable priority queue
2021-06-01 14:09:24 -07:00
Nicholas Van Sickle 087677b326 Fix several viewport issues (#1045)
* Fix some FOV calculation viewport issues:
-Avoid calculating FOV if we've got an invalid viewport
-Don't override game mode FOV, let the active camera components manage it instead

* Fix viewport font positioning

This updates code in a few places to respect an API change/fix made to AtomFont - also switched the default value of m_virtual800x600ScreenSize to false as it's really behavior you want to opt into

* Don't activate CameraComponentController when in the Editor / not in game mode
2021-06-01 12:20:15 -07:00
AMZN-koppersr c0dade8883 Merge branch 'main' into SpawnablePriorityQueue 2021-06-01 09:57:27 -07:00
Tom Hulton-Harrop 3947dcf213 Add some extra cvars to control orbit point appearance and remove unused ones (#1032) 2021-06-01 09:36:00 +01:00
greerdv 2c36d6a19a Merge pull request #1039 from aws-lumberyard-dev/transform-float-scale-3
refactor vector scale in Transform to float scale
2021-05-28 21:20:03 +01:00
sconel 57b961c113 Merge pull request #997 from aws-lumberyard-dev/Spawnable/ScriptCanvas/Integration
Add dynamic spawn node to Script Canvas
2021-05-28 13:09:25 -07:00
Aaron Ruiz Mora 00e860f326 Physics material system for spectra launch
- Invalidate 'Physics Materials From Mesh' boolean from collider component
- Removed material library from material selector. Default material library will always be used instead.
- Marking failing automated test as xfail
- Added default material to physics configuration.
- Moved material library asset from physx configuration to physics configuration, as it doesn't need to be physx specific.
- Refactor physics material system having into account that there is only one material library in the project.
- Renaming code from DefaultMaterialLibrary to MaterialLibrary.
- All queries about physics materials unified under PhysicsMaterialRequests bus.
- PhysXSystem only manages the material library asset.
- Saving and reloading the same physics material asset with different content didn't trigger a events that the material library has changed.
- Changing Physics Material Request interface to use shared_ptr instead of weak_ptr to be simpler to handle the returned materials and having a more consistent code.
- Refactored Material Manager to improve its implementation. Still following the same approach of "creating materials on the fly as they are requested", but now it's doing it consistently across the interface, with private helpers functions FindOrCreateMaterial that simplify vastly the implementation.
- Material Manager now listens to change event of material library asset and default material configuration so it updates its materials accordingly.
- Complete Material move constructor and operator.
2021-05-28 20:16:25 +01:00
Esteban Papp ff9a052ce6 Merge pull request #1011 from aws-lumberyard-dev/ly-as-sdk/LYN-2948
Integration of the LY as an SDK work
2021-05-28 11:30:13 -07:00
greerdv 34abf7376e Merge branch 'main' into transform-float-scale-3 2021-05-28 19:14:45 +01:00
sconel 0a32951e7e Merge branch 'main' of https://github.com/aws-lumberyard/o3de into Spawnable/ScriptCanvas/Integration 2021-05-28 10:48:44 -07:00
greerdv 55d3d18c9b update transform component to remove vector scale transform function 2021-05-28 16:44:09 +01:00
pappeste eece07efd3 Merge branch 'main' into ly-as-sdk/LYN-2948 2021-05-28 08:29:29 -07:00
pereslav 090234f1f0 Merge branch 'main' into MultiplayerPipeline 2021-05-28 16:00:09 +01:00
pereslav 42b3e3817a SPEC-7012 Added rewind-aware scene query utilities. Added frame ID to SimulatedBody 2021-05-28 15:50:02 +01:00
Tom Hulton-Harrop 36ceff84c9 Support mesh intersection for camera orbit (#982)
* wip support for mesh intersection with intersector bus

* WIP camera mesh intersection orbit logic

* remove unneeded template argument

* add bus connect/disconnect

* fix intersection logic

* small updates, additional comments, some tidy-up

* update formatting options slightly

* use aznumeric_cast

* temp workaround for negative distances with RayIntersection
2021-05-28 14:37:17 +01:00
greerdv d73566565e remove most vector scale functions from transform bus 2021-05-28 14:18:26 +01:00
greerdv e4f73d44fe remove vector scale and add uniform scale as animatable properties 2021-05-28 10:33:12 +01:00
pappeste 8b9f5230f6 Merge branch 'main' into ly-as-sdk/LYN-2948 2021-05-28 00:16:26 -07:00
AMZN-koppersr 40dbf22b00 Merge branch 'main' into SpawnablePriorityQueue 2021-05-27 16:16:10 -07:00
AMZN-koppersr 2550c3e1ff Spawnable Entity Manager threshold default to "m_highPriorityThreshold" 2021-05-27 16:13:32 -07:00
AMZN-koppersr c946d57928 Addressed PR feedback. 2021-05-27 11:14:21 -07:00
jackalbe 5b5d02baa4 {LYN-4060} Helios - Fix to load PAK Archive files (#964)
* {LYN-4060} Helios - Fix to load PAK Archive files

{LYN-4060} Helios - Fix to load PAK Archive files

* Helios - Archive does not load from PAK files due to IsFileExists() error
* the decompression tag does not need to be ZCRY, so removed it
* the PAK files are on disk, so a "on disk file exists" method is used
* the mapped files m_mapFiles need to track the file path, not just the filename

Tests: Release Launcher with a new level

* re-adding the read only flag check so that ZIP files can be created
2021-05-27 12:59:42 -05:00
pappeste 01933f45b1 Merge branch 'main' into ly-as-sdk/LYN-2948
# Conflicts:
#	Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/gem.json
2021-05-27 10:39:37 -07:00
pappeste f1b688f435 Merge branch 'main' into ly-as-sdk/LYN-2948
# Conflicts:
#	CMakeLists.txt
#	Code/Tools/ProjectManager/Source/GemCatalog/GemInfo.h
#	Gems/AtomLyIntegration/AtomViewportDisplayInfo/gem.json
#	cmake/LYWrappers.cmake
#	cmake/SettingsRegistry.cmake
#	scripts/o3de/tests/unit_test_current_project.py
2021-05-27 10:29:19 -07:00
amzn-sean 529e29071c update Ragdoll component to only uses Handles (#981) 2021-05-27 16:42:17 +01:00
greerdv 34c59a81b8 update rigid body to use non-deprecated function and remove many deprecated transform bus functions 2021-05-27 10:51:36 +01:00
Tom Hulton-Harrop 4205a69106 Allow ComponentAdapter (and related types) to work with EntityComponentIdPairs as well as EntityIds (#920)
* provide the ability for component adapters to support multiple components per entity

* add missing explicit keywords

* updates following review feedback - update how template logic works

* small updats (fix typo, remove redundant includes)

* add missing this->

* naming change, common -> controller

* add [[maybe_unused]]
2021-05-27 09:34:52 +01:00
michabr 8bd4c8d974 Add back text drawing using Draw2d (#928)
This is used by the UI Editor's viewport and also by LyShine to display debug text.
2021-05-26 20:51:05 -07:00
sconel 07ecb938e7 Merge branch 'main' of https://github.com/aws-lumberyard/o3de into Spawnable/ScriptCanvas/Integration 2021-05-26 16:45:23 -07:00
sconel b5599ca739 Add asset picker support to spawn SC node and thread safety measures 2021-05-26 16:45:04 -07:00
AMZN-koppersr 1248dc5fb4 Spawning priority threshold through SetReg
The priority threshold to consider a task high priority can now be configured through the Settings Registry under key "/O3DE/AzFramework/Spawnables/HighPriorityThreshold".
2021-05-26 16:39:24 -07:00
AMZN-koppersr e0948a26bc Fixed early ticket delete crash
This commit fixes a crash that could happen when a spawnable ticket was deleted before all requests in the queue had completed. Because of this crash the requests now only hold on to the payload of the ticket but not the ticket itself. As a side effect, callbacks can no longer provide the ticket itself so instead a unique id for the ticket is returned.
2021-05-26 14:29:39 -07:00
AMZN-koppersr 76827ff95e Added support for a priority lane for entity spawning
It's now possible to have high and normal priority calls on the spawnable entities manager. This allows for events like (de)spawning and retrieving information to be executed before already queued requests, though requests cannot be reordered on the same ticket. High priority calls are executed twice per frame, while normal priority calls are called only once.
2021-05-26 14:29:35 -07:00
AMZN-koppersr 37b53c0680 Spawnables can no longer be moved.
Spawnables had support for moving, but as the base class AZ::Data::AssetData doesn't support moving this was causing subtle issues. Moving spawnables wasn't used so it was removed.
2021-05-26 14:29:31 -07:00
Mike Balfour 6c17c7bfb3 Add new API to convert absolute source paths to relative paths. (#930)
There are already APIs for getting a relative product path from an absolute source path, or getting a relative source path for an *existing* source file, but there were no APIs for getting a relative source path for a *new* source file.  Prefabs will need this ability to be able to correctly generate a relative source path inside the prefab file before the file has been saved.
The logic for relative source paths is a little bit tricky because the paths are relative to the watch folders, and the watch folders can be nested, with different priorities to explain which should take precedence.  The input paths can also include specifiers like "." and "..", which need to be reconciled before creating the final correct relative path.  The included unit tests test all of the tricky edge cases that I was able to identify.
2021-05-26 15:30:21 -05:00
AMZN-koppersr a82f4440ea Fixed release compile error 2021-05-26 10:24:15 -07:00
AMZN-koppersr f3212902aa Merge branch 'main' into SpawnableIndexQuery 2021-05-26 09:48:20 -07:00
SJ 8ca3b078a2 Remove bootstrap.cfg and some references to it.
Merge pull request #836 from aws-lumberyard-dev/LYN-2461
2021-05-26 09:32:57 -07:00
lumberyard-employee-dm 76fe7f3666 Merge branch 'main' of https://github.com/aws-lumberyard/o3de into ly-as-sdk/LYN-2948-phistere 2021-05-25 23:48:55 -05:00
lumberyard-employee-dm 4e362a2a04 Removing the initialization of the "@root@" alias to the EngineRoot since it really represents the Asset Cache Root and any paths within it are lowercased. Moved the ordering to set the @assets@ alias before the @projectplatformcache@ so that the "ArchiveTestFixture.IResourceList_Add_AbsolutePath_RemovesAndReplacesWithAlias" test is able to convert it's absolute path to an alias path that starts with @assets@ 2021-05-25 20:09:13 -05:00