Skip to content
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

[Physics] Bepu integration #2131

Open
wants to merge 502 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
502 commits
Select commit Hold shift + click to select a range
4d485cc
fixs & clean
Nicogo1705 Dec 20, 2023
f2c28ab
scene update
Nicogo1705 Dec 20, 2023
5066fc3
fix scene 3, 4 & 9
Nicogo1705 Dec 20, 2023
50a3d86
cleanup
Doprez Dec 20, 2023
7ae1742
Initial testing
Doprez Dec 20, 2023
dfb1175
Merge pull request #32 from Doprez/wireframe-debug
Nicogo1705 Dec 21, 2023
77af66c
cleanup
Doprez Dec 21, 2023
9945781
Merge branch 'master' into improve-navigation
Doprez Dec 21, 2023
054fa19
Debug render 'working'
Nicogo1705 Dec 21, 2023
83df4ff
Comments
Nicogo1705 Dec 21, 2023
28ce8a2
little fix
Nicogo1705 Dec 21, 2023
5b4ff85
mesh position issue
Nicogo1705 Dec 21, 2023
e9f5b2d
update shapedata and render info
Doprez Dec 21, 2023
0b1f7fe
fix nav mesh generation
Doprez Dec 21, 2023
6633f6b
added simple toggle
Doprez Dec 21, 2023
ef27072
added line size setting
Doprez Dec 21, 2023
d61c1bf
add a collider case in scene 0
Nicogo1705 Dec 21, 2023
ce4b090
Merge pull request #33 from Doprez/clean-shapedata
Nicogo1705 Dec 21, 2023
fae5036
Merge branch 'master' into improve-navigation
Doprez Dec 21, 2023
4e7c21f
up
Nicogo1705 Dec 21, 2023
d0cae5c
almost fixed
Nicogo1705 Dec 21, 2023
75039cc
omg fixed it i think
Nicogo1705 Dec 22, 2023
3d0d510
it work if hull collider have same origin as mesh
Nicogo1705 Dec 22, 2023
8c46ae8
Merge branch 'master' into improve-navigation
Doprez Dec 22, 2023
a3a56cc
fixed navigation with new ShapeData changes
Doprez Dec 22, 2023
8e324d1
Merge branch 'master' into improve-navigation
Doprez Dec 22, 2023
951a676
better test case & fix
Nicogo1705 Dec 22, 2023
6c418c2
fixed nav for new mesh data again
Doprez Dec 22, 2023
d13064d
testing rotation
Doprez Dec 22, 2023
b62d8ce
added renderFeature toggle to Camera
Doprez Dec 22, 2023
40667de
Merge pull request #31 from Doprez/improve-navigation
Doprez Dec 22, 2023
6b9f0b3
fixs some debug render issues
Nicogo1705 Dec 22, 2023
2e03895
fix missing wireframe issue
Doprez Dec 22, 2023
c0b1552
Merge pull request #35 from Doprez/master
Doprez Dec 22, 2023
452a86f
removed auto adding render feature
Doprez Dec 23, 2023
17b6f5b
Merge branch 'Nicogo1705:master' into master
Doprez Dec 23, 2023
840f534
Merge pull request #36 from Doprez/master
Doprez Dec 23, 2023
7662686
Add debug render to Demo
Nicogo1705 Dec 23, 2023
a03a9ca
check null sceneinstance
Doprez Dec 23, 2023
6c99b48
Merge branch 'Nicogo1705:master' into master
Doprez Dec 23, 2023
4e202bc
Merge pull request #37 from Doprez/master
Doprez Dec 23, 2023
93ab1f0
Update README.md
Doprez Dec 23, 2023
94f7436
remove thread crash issue
Doprez Dec 24, 2023
a203f91
typos
Doprez Dec 24, 2023
8a66f6d
typo
Doprez Dec 24, 2023
abffaff
performance gain
Doprez Dec 25, 2023
9275a18
added warning comment back
Doprez Dec 25, 2023
2437a37
replaced throw with null check
Doprez Dec 26, 2023
a8396a4
Merge pull request #43 from Doprez/fix-contact-crash
Nicogo1705 Dec 26, 2023
5140a11
Merge pull request #41 from Doprez/fix-thread-crash
Nicogo1705 Dec 26, 2023
aa122c6
Merge pull request #40 from Doprez/update-readme
Nicogo1705 Dec 26, 2023
8ee73cc
Update README.md
Nicogo1705 Dec 26, 2023
6810d73
Update README.md
Nicogo1705 Dec 26, 2023
648ff60
update scene 9
Nicogo1705 Dec 26, 2023
37d5454
Merge branch 'master' of https://github.com/Nicogo1705/Stride.BepuPhy…
Nicogo1705 Dec 26, 2023
fba1912
Lot of changes, this is a WIP.
Nicogo1705 Dec 31, 2023
4cb7394
Move bepuPhysics logic to a GameSystem
Nicogo1705 Jan 2, 2024
d8ce433
Moving collider Component to List inside container instead
Nicogo1705 Jan 2, 2024
adc88c8
Fix scenes, still WIP
Nicogo1705 Jan 3, 2024
9f4c7c4
[Nav] Cleanup Navigation and implement basic asynchronous rebuild
Eideren Jan 4, 2024
dab4939
Merge pull request #45 from Eideren/refactor3
Doprez Jan 5, 2024
ff2d12f
Introducing BepuShapeCacheSystem
Nicogo1705 Jan 5, 2024
51b7f2f
Code Format & Clean
Nicogo1705 Jan 5, 2024
fd17fcc
it's almost good for debug render
Nicogo1705 Jan 5, 2024
0eea06e
fix orientation issue
Nicogo1705 Jan 5, 2024
f0d6ed9
lasts fixs
Nicogo1705 Jan 6, 2024
84862fa
last fix i hope
Nicogo1705 Jan 6, 2024
9525a70
cleaning
Nicogo1705 Jan 6, 2024
f250207
code clean & improvements
Nicogo1705 Jan 6, 2024
cc8bb25
[Debug] Weak reference for mesh shapes, reduce memory usage, fix hull…
Eideren Jan 6, 2024
1624d7d
[Debug] Reduce flickering
Eideren Jan 6, 2024
9849bc2
Merge pull request #46 from Eideren/refactor_debug_shapes
Nicogo1705 Jan 6, 2024
de8e05c
fix & Debug Render test
Nicogo1705 Jan 6, 2024
554948a
fix merge
Nicogo1705 Jan 6, 2024
424d430
fixs & improve scene 0
Nicogo1705 Jan 6, 2024
f068406
fix car scene & introduce soft start
Nicogo1705 Jan 6, 2024
370c392
fix scenes WIP
Nicogo1705 Jan 6, 2024
2069a0b
all scenes are now fixed
Nicogo1705 Jan 6, 2024
bdab3f1
little fix
Nicogo1705 Jan 7, 2024
8bd3269
Dispose shapes properly
Eideren Jan 8, 2024
4fad6dc
Optimize root container transform sync
Eideren Jan 8, 2024
bd27510
Optimize debug renderer updates
Eideren Jan 8, 2024
d8a49f3
fix entities child positions
Nicogo1705 Jan 8, 2024
291634c
Implement 2D physics WIP (very early)
Nicogo1705 Jan 9, 2024
edc69ca
upgrade demo & fix
Nicogo1705 Jan 9, 2024
18ec8f2
up
Nicogo1705 Jan 9, 2024
32f5b6f
Update dotnet-nuget.yml
Nicogo1705 Jan 9, 2024
83689fa
Update dotnet-nuget.yml
Nicogo1705 Jan 9, 2024
96ae790
Update dotnet-nuget.yml
Nicogo1705 Jan 9, 2024
d340d63
Minor optimization for debug shapes
Eideren Jan 10, 2024
8172f4a
Minor optimization for debug shapes #2
Eideren Jan 10, 2024
4492e01
IContainerWith* inherit from IContainer
Eideren Jan 10, 2024
5bf80c5
CharacterComponent inherits from SimulationUpdateComponent, change Co…
Eideren Jan 10, 2024
8a1130c
Target base ContactEventHandler instead of recursion
Eideren Jan 10, 2024
efd5100
Triggers ignore contacts between removed bodies
Eideren Jan 10, 2024
618213b
not sure that solution is optimal, but we want to keep every containe…
Nicogo1705 Jan 10, 2024
566d152
little refacto
Nicogo1705 Jan 10, 2024
3682dbc
Add BepuOrderHelper
Nicogo1705 Jan 10, 2024
0bfe203
refactoring, fix 2d
Nicogo1705 Jan 10, 2024
1e7d919
more substep for sim2, WIP better 2D support
Nicogo1705 Jan 11, 2024
f43b1bd
Optimize GetWorldPos
Eideren Jan 11, 2024
8b8a4de
Fix concurrency issue when recomputing body position
Eideren Jan 11, 2024
527aed4
Fix latency in debug transform
Eideren Jan 11, 2024
5811bd2
Fields instead of list for constraints
Eideren Jan 11, 2024
6b167db
Tweak slope logic for character controller
Eideren Jan 11, 2024
38003e0
[Debug] ClearTrackingForContainer optimization
Eideren Jan 11, 2024
a3b7c1b
[Statics] Start work on rebuilding statics after move
Eideren Jan 11, 2024
1c8e374
[Statics] Rebuild using IStaticContainer instead of staticContainerCo…
Eideren Jan 11, 2024
f51b764
[PTests] Small fix to Ray and sweeps with arrays
Eideren Jan 12, 2024
e461f83
[Sim] Add Deterministic toggle
Eideren Jan 12, 2024
6323c06
[SimComp] Fix nullref when SimUpdateComp runs before BepuConfiguratio…
Eideren Jan 12, 2024
fd4b9fd
[Core] Throw when GetContainerFromCollidable returns null
Eideren Jan 12, 2024
0119268
[PTests] Point individual AllowTests into TestHandler.AllowTest
Eideren Jan 12, 2024
673e559
[Core] Follow up to 92283ddc to align rest of the code base to this
Eideren Jan 12, 2024
eb332f7
[PTests] Implement overlap tests
Eideren Jan 12, 2024
c6a7d14
[Core] Implement body interpolation
Eideren Jan 12, 2024
aaba6ec
[Core] Enable interpolation by default on CharacterComponent and mino…
Eideren Jan 12, 2024
0dbf3b3
Fix debug render processor (was using BHandle even for statics)
Nicogo1705 Jan 12, 2024
56d0a6b
Fixing warnings & adding one
Nicogo1705 Jan 12, 2024
01e52ba
added better coloring
Nicogo1705 Jan 13, 2024
932f245
improv 2D perf
Nicogo1705 Jan 13, 2024
55b14df
[Time] Swap time tracking to TimeSpan to avoid lossy conversions
Eideren Jan 13, 2024
9b17f0d
[Sim] Use WarpElapsed, refactor BepuSimulation, improve documentation
Eideren Jan 14, 2024
e37c848
[Core] Fix warnings
Eideren Jan 14, 2024
aa5a895
[Simulation] Default SolverSubStep to 16
Eideren Jan 14, 2024
96913d9
[Constraints] Remove redundant bodies count check
Eideren Jan 14, 2024
e76a52c
[Container] Clean 'RebuildContainer', fix _exist for 'IContainerWithM…
Eideren Jan 14, 2024
8c7a013
[Statics] Implement static displacement (untested)
Eideren Jan 14, 2024
fac2cdd
[Simulation] Mapping from handle to containers changed from dictionar…
Eideren Jan 14, 2024
3b92f47
[Simulation] Update default constraint configuration
Eideren Jan 14, 2024
57e4440
[Core] Store references instead of handles, fix edge case bug when us…
Eideren Jan 15, 2024
81fc6b4
[Simulation] Minor cleanup
Eideren Jan 15, 2024
cdb817e
Improve debug render colors
Nicogo1705 Jan 15, 2024
f1d8832
WIP softbodies, improvements & refactoring
Nicogo1705 Jan 16, 2024
3c399f7
[Container] Relax bodies and statics registration for soft physics
Eideren Jan 16, 2024
840d185
[Mesh] Improve Mesh caching and cache system
Eideren Jan 16, 2024
9ec6dc1
[Navigation] Fix shape transformation
Eideren Jan 16, 2024
7dd7e50
[Navigation] Replace unnecessary stackalloc
Eideren Jan 16, 2024
09fdbc2
fix navigation containers
Nicogo1705 Jan 17, 2024
345ffea
Fix navigation
Nicogo1705 Jan 17, 2024
ac221fc
[Navigation] Cleanup processor
Eideren Jan 17, 2024
c125b69
[Containers] Improve editor UI, introduce CollisionMask to create a m…
Eideren Jan 17, 2024
d4cf94e
[MeshContainer] Enforce non-null mesh
Eideren Jan 17, 2024
e5e7c1d
[Interpolation] Ensure poses are set when starting interpolation
Eideren Jan 17, 2024
790fcb6
regenerarte/fix scenes serializer data
Nicogo1705 Jan 17, 2024
c3eea91
[Container] Fix misaligned starting physics pose
Eideren Jan 17, 2024
2cf7b0d
[Container] Expand collider list in editor by default
Eideren Jan 17, 2024
5b94abe
[Container] Enforce non-null mesh from warning to error
Eideren Jan 18, 2024
1cd7416
add Gravity gun to some demo scenes
Nicogo1705 Jan 18, 2024
82a66cb
Project refactor
Eideren Jan 19, 2024
38a98bb
Move trigger to definition
Eideren Jan 19, 2024
61fd7ee
Merge categories together in editor to improve search
Eideren Jan 19, 2024
79e092f
Fix stride data
Nicogo1705 Jan 20, 2024
4e44de0
Fix some issues (0.Colldiers need a little bit of editing to test sha…
Nicogo1705 Jan 20, 2024
a20e922
oops, last little fix
Nicogo1705 Jan 20, 2024
4cef9ac
Change StaticColliderComponent to StaticComponent &
Nicogo1705 Jan 21, 2024
6a3487c
repair of scenes 0, 1 & 2 + workaround for stride
Nicogo1705 Jan 21, 2024
d175b32
and all the others
Nicogo1705 Jan 21, 2024
de5adc1
and lasts fixs
Nicogo1705 Jan 21, 2024
a8abbc7
Time to change this QR Texture ...to an other :)
Nicogo1705 Jan 21, 2024
3f427c0
Add big compound
Nicogo1705 Jan 21, 2024
76eb38a
Move BepuAndStrideExtensions & the two Helper to definitions
Nicogo1705 Jan 21, 2024
ebff590
Improve 2D,
Nicogo1705 Jan 21, 2024
410848f
SoftBodies WIP
Nicogo1705 Jan 22, 2024
e2a8076
WIP soft
Nicogo1705 Jan 22, 2024
d2427bc
Adding a slow/LowLevel debug render (to debug softs)
Nicogo1705 Jan 22, 2024
c1c1ffd
Merge branch 'container_rework'
Eideren Jan 23, 2024
853311c
[Editor][Plugin] Expose and cleanup gizmos
Eideren Jan 26, 2024
636da6d
WIP SoftBodies working.
Nicogo1705 Jan 26, 2024
a287976
improve perf, destroy soft
Nicogo1705 Jan 27, 2024
4cfc66d
Update README.md
Nicogo1705 Jan 27, 2024
13d7245
Gizmos
Eideren Jan 26, 2024
6c30221
Replace big compound with bool, change list workaround
Eideren Jan 27, 2024
3f710c6
[Editor] Collection supports in abstract properties
Eideren Jan 23, 2024
e4aa912
[Editor][Plugin] Expose and cleanup gizmos
Eideren Jan 26, 2024
fc42552
Merge branch 'bepu_thin' into bepu_new
Eideren Jan 28, 2024
36efd47
[Bepu] Integration post-merge
Eideren Jan 28, 2024
0d17ae2
[Bepu] Finish project setup
Eideren Feb 8, 2024
3134b20
[Bepu] Fix build edge case
Eideren Feb 15, 2024
c2a494d
[Bepu] Remove deprecated files
Eideren Feb 15, 2024
65225bf
[Bepu] Explicit hull asset
Eideren Feb 10, 2024
7730f3e
[Bepu] Double CollisionMask entries
Eideren Feb 10, 2024
c69c1ee
[Bepu] Swap IgnoreGlobalGravity into Gravity
Eideren Feb 12, 2024
f092b24
[Bepu] Fix mesh fetching
Eideren Feb 20, 2024
df2b477
[Assets] Prevent crash of the assets compiler when an assembly cannot…
Kryptos-FR Feb 23, 2024
271185a
[Bepu] Fix ConvexHull local offset
Eideren Feb 28, 2024
375eb13
[Bepu] Improve overlap, stackalloc'able physics test API
Eideren Mar 3, 2024
6e60826
[Bepu] Fix comment
Eideren Mar 3, 2024
ac3465a
[Bepu] Shorten extension conversion methods
Eideren Mar 3, 2024
0f8d111
Merge branch 'pr/12' into bepu-integration
Doprez Apr 6, 2024
7d10728
Merge master into bepu_integration (#2)
Doprez Apr 9, 2024
bb3e595
[Bepu] Rename ContainerComponent into CollidableComponent
Eideren Mar 5, 2024
50a50a4
Merge branch 'master' into bepu_integration
Eideren Apr 13, 2024
8991cbb
Fix new and outstanding warnings
Eideren Apr 13, 2024
d06eed2
Cache ConvexHulls
Eideren Apr 14, 2024
37c6760
[Bepu] Validate more warnings
Eideren Apr 14, 2024
cc3924a
[Bepu] Add license
Eideren Apr 14, 2024
cbce81a
[Bepu] Move simulation to run at the end of update to reduce latency
Eideren Apr 14, 2024
a938304
[Bepu] Finish convex hull serialization and cache
Eideren May 11, 2024
f1091c6
[Bepu] Remove Softbody support, delayed to post release instead
Eideren May 11, 2024
b0fdd4b
Merge branch 'master' into bepu-integration
Doprez May 31, 2024
04491c7
Merge branch 'master' into bepu-integration
Doprez Jun 9, 2024
c9010de
remove extra nugets
Doprez Jun 9, 2024
19845b5
update dotrecast
Doprez Jun 9, 2024
5cfd31a
Add GameStudio config
Doprez Jun 9, 2024
5cd5930
add math conversions
Doprez Jun 9, 2024
612e6b3
Add basic navigation agent
Doprez Jun 9, 2024
9572af2
Add physics navigation agent
Doprez Jun 9, 2024
6171f61
Merge branch 'eideren-bepu_integration' into doprez-bepu-integration
Doprez Jun 9, 2024
0e43a72
Merge remote-tracking branch 'refs/remotes/Doprez/master' into bepu_i…
Eideren Jun 10, 2024
18c0a11
Merge Doprez Navigation Changes
Eideren Jun 10, 2024
95df6cf
Use dotnet runtime's editorconfig instead of inheriting from Stride's…
Eideren Jun 10, 2024
fedb11e
Apply coding style over new recast changes
Eideren Jun 10, 2024
5fbe1ea
Fix null issues, minor style tweaks and warnings
Eideren Jun 10, 2024
6a913c1
Strip forced bepu rebuild on opening up the demo, too time-consuming
Eideren May 19, 2024
1e2fa3f
Use cc0 assets
Eideren May 19, 2024
d85079c
Merge remote-tracking branch 'refs/remotes/Doprez/master' into gizmo
Eideren Jun 10, 2024
2a60010
Handle newly introduced ModelGizmo post merge
Eideren Jun 10, 2024
9b0fc5d
Merge branch 'refs/heads/gizmo' into bepu_integration
Eideren Jun 10, 2024
fcd662a
Specify that changes to colliders may reset internal physics state
Eideren Jun 11, 2024
3849300
Remove CharacterComponent's debug info
Eideren Jun 11, 2024
b05eeb3
Minor changes and more annotate one more callsite to check with Norbo
Eideren Jun 11, 2024
20a8aa2
Rewrite constraints backend, introduce Constraint list for BodyComponent
Eideren Jun 11, 2024
c776c43
Create Test project covering BepuPhysics, starting with constraints
Eideren Jun 11, 2024
358afca
Fix ListOfColliders workaround, in turn fixing some issues with gizmos
Eideren Jun 11, 2024
4cfa3b6
Basic Constraint Gizmos
Eideren Jun 13, 2024
6af3b24
Enable/Disable gizmos
Eideren Jun 13, 2024
057dbf7
Remove deprecated Stride.Physics reference
Eideren Jun 14, 2024
6af167c
Rename Stride.BepuPhysics.DebugRender to Debug
Eideren Jun 14, 2024
e19a7a1
Update .sdscene based on naming and structure changes
Eideren Jun 14, 2024
9282ed5
Rollback to EntityProcessor
Eideren Jun 14, 2024
b673069
Improve collider change tracking
Eideren Jun 14, 2024
f97344a
Ensure adding the debug component before adding collidables still set…
Eideren Jun 14, 2024
7cb2f4b
Surface index of child hit by physics tests
Eideren Jul 12, 2024
874e058
Fix collidable starting empty failing to reattach
Eideren Jul 23, 2024
7c9662b
Fix interpolation being ignored unless specifically toggled while in …
Eideren Aug 15, 2024
08cced2
Writing to either Body.Position and Body.Orientation set the transfor…
Eideren Sep 7, 2024
e0f5b66
Virtualize and document CharacterComponent to allow users to customiz…
Eideren Sep 7, 2024
838d8eb
Merge remote-tracking branch 'STRIDE/master' into bepu_integration
Eideren Sep 7, 2024
371df49
Fix naming scheme change post merge
Eideren Sep 7, 2024
e1d0df9
Rewrite of the collision mask feature
Eideren Sep 20, 2024
538e34f
Improve editor UI for CollisionMask slightly
Eideren Sep 21, 2024
bee29c6
Merge remote-tracking branch 'STRIDE/master' into bepu_integration
Eideren Sep 22, 2024
27a60b4
Fix unwritable collision mask
Eideren Sep 22, 2024
dacab03
Finish porting the last couple of invalid collision mask in the demo
Eideren Sep 23, 2024
bfc85d2
FilterByDistance renamed to CollisionGroup, improve documentation
Eideren Sep 23, 2024
c1219e2
Default Value for CollisionGroup
Eideren Sep 23, 2024
3e3b96c
Fix demo car collision mask
Eideren Sep 23, 2024
59674b1
feat: Custom Depth Test Function for Materials (#2415)
Eideren Oct 1, 2024
570a12f
-- temporary while we catch up with master --
Eideren Oct 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 109 additions & 1 deletion build/Stride.sln
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,23 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.NuGetResolver", "..\
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuGetResolver", "NuGetResolver", "{158087CF-AF74-44E9-AA20-A6AEB1E398A9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stride.Core.Presentation", "..\sources\presentation\Stride.Core.Presentation\Stride.Core.Presentation.csproj", "{0C63EF8B-26F9-4511-9FC5-7431DE9657D6}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.Core.Presentation", "..\sources\presentation\Stride.Core.Presentation\Stride.Core.Presentation.csproj", "{0C63EF8B-26F9-4511-9FC5-7431DE9657D6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Stride.Bepu", "Stride.Bepu", "{DE048114-9AE4-467E-A879-188DC0D88A59}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.BepuPhysics", "..\sources\engine\Stride.BepuPhysics\Stride.BepuPhysics\Stride.BepuPhysics.csproj", "{3E424688-EC44-4DFB-9FC0-4BB1F0683651}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.BepuPhysics._2D", "..\sources\engine\Stride.BepuPhysics\Stride.BepuPhysics._2D\Stride.BepuPhysics._2D.csproj", "{A8B00252-A78E-43F2-8677-57A63CCF1ABA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.BepuPhysics.DebugRender", "..\sources\engine\Stride.BepuPhysics\Stride.BepuPhysics.DebugRender\Stride.BepuPhysics.DebugRender.csproj", "{7715D094-DF59-4D91-BC9A-9A5118039ECB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.BepuPhysics.Demo", "..\sources\engine\Stride.BepuPhysics\Stride.BepuPhysics.Demo\Stride.BepuPhysics.Demo.csproj", "{E56FFD91-590E-442A-910B-CC88C92AE553}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.BepuPhysics.Demo.Windows", "..\sources\engine\Stride.BepuPhysics\Stride.BepuPhysics.Demo.Windows\Stride.BepuPhysics.Demo.Windows.csproj", "{B7F08BEE-39ED-4F1A-AA06-3BADE320288B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.BepuPhysics.Navigation", "..\sources\engine\Stride.BepuPhysics\Stride.BepuPhysics.Navigation\Stride.BepuPhysics.Navigation.csproj", "{0BC0E590-524E-4311-A3E9-371BE6AFF536}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.BepuPhysics.Soft", "..\sources\engine\Stride.BepuPhysics\Stride.BepuPhysics.Soft\Stride.BepuPhysics.Soft.csproj", "{8E5E44B3-92FD-4C79-AA06-7E8CBFDDBB32}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -1493,6 +1509,90 @@ Global
{0C63EF8B-26F9-4511-9FC5-7431DE9657D6}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{0C63EF8B-26F9-4511-9FC5-7431DE9657D6}.Release|Win32.ActiveCfg = Release|Any CPU
{0C63EF8B-26F9-4511-9FC5-7431DE9657D6}.Release|Win32.Build.0 = Release|Any CPU
{3E424688-EC44-4DFB-9FC0-4BB1F0683651}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3E424688-EC44-4DFB-9FC0-4BB1F0683651}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3E424688-EC44-4DFB-9FC0-4BB1F0683651}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{3E424688-EC44-4DFB-9FC0-4BB1F0683651}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{3E424688-EC44-4DFB-9FC0-4BB1F0683651}.Debug|Win32.ActiveCfg = Debug|Any CPU
{3E424688-EC44-4DFB-9FC0-4BB1F0683651}.Debug|Win32.Build.0 = Debug|Any CPU
{3E424688-EC44-4DFB-9FC0-4BB1F0683651}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3E424688-EC44-4DFB-9FC0-4BB1F0683651}.Release|Any CPU.Build.0 = Release|Any CPU
{3E424688-EC44-4DFB-9FC0-4BB1F0683651}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{3E424688-EC44-4DFB-9FC0-4BB1F0683651}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{3E424688-EC44-4DFB-9FC0-4BB1F0683651}.Release|Win32.ActiveCfg = Release|Any CPU
{3E424688-EC44-4DFB-9FC0-4BB1F0683651}.Release|Win32.Build.0 = Release|Any CPU
{A8B00252-A78E-43F2-8677-57A63CCF1ABA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A8B00252-A78E-43F2-8677-57A63CCF1ABA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A8B00252-A78E-43F2-8677-57A63CCF1ABA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{A8B00252-A78E-43F2-8677-57A63CCF1ABA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{A8B00252-A78E-43F2-8677-57A63CCF1ABA}.Debug|Win32.ActiveCfg = Debug|Any CPU
{A8B00252-A78E-43F2-8677-57A63CCF1ABA}.Debug|Win32.Build.0 = Debug|Any CPU
{A8B00252-A78E-43F2-8677-57A63CCF1ABA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A8B00252-A78E-43F2-8677-57A63CCF1ABA}.Release|Any CPU.Build.0 = Release|Any CPU
{A8B00252-A78E-43F2-8677-57A63CCF1ABA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{A8B00252-A78E-43F2-8677-57A63CCF1ABA}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{A8B00252-A78E-43F2-8677-57A63CCF1ABA}.Release|Win32.ActiveCfg = Release|Any CPU
{A8B00252-A78E-43F2-8677-57A63CCF1ABA}.Release|Win32.Build.0 = Release|Any CPU
{7715D094-DF59-4D91-BC9A-9A5118039ECB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7715D094-DF59-4D91-BC9A-9A5118039ECB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7715D094-DF59-4D91-BC9A-9A5118039ECB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{7715D094-DF59-4D91-BC9A-9A5118039ECB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{7715D094-DF59-4D91-BC9A-9A5118039ECB}.Debug|Win32.ActiveCfg = Debug|Any CPU
{7715D094-DF59-4D91-BC9A-9A5118039ECB}.Debug|Win32.Build.0 = Debug|Any CPU
{7715D094-DF59-4D91-BC9A-9A5118039ECB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7715D094-DF59-4D91-BC9A-9A5118039ECB}.Release|Any CPU.Build.0 = Release|Any CPU
{7715D094-DF59-4D91-BC9A-9A5118039ECB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{7715D094-DF59-4D91-BC9A-9A5118039ECB}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{7715D094-DF59-4D91-BC9A-9A5118039ECB}.Release|Win32.ActiveCfg = Release|Any CPU
{7715D094-DF59-4D91-BC9A-9A5118039ECB}.Release|Win32.Build.0 = Release|Any CPU
{E56FFD91-590E-442A-910B-CC88C92AE553}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E56FFD91-590E-442A-910B-CC88C92AE553}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E56FFD91-590E-442A-910B-CC88C92AE553}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{E56FFD91-590E-442A-910B-CC88C92AE553}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{E56FFD91-590E-442A-910B-CC88C92AE553}.Debug|Win32.ActiveCfg = Debug|Any CPU
{E56FFD91-590E-442A-910B-CC88C92AE553}.Debug|Win32.Build.0 = Debug|Any CPU
{E56FFD91-590E-442A-910B-CC88C92AE553}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E56FFD91-590E-442A-910B-CC88C92AE553}.Release|Any CPU.Build.0 = Release|Any CPU
{E56FFD91-590E-442A-910B-CC88C92AE553}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{E56FFD91-590E-442A-910B-CC88C92AE553}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{E56FFD91-590E-442A-910B-CC88C92AE553}.Release|Win32.ActiveCfg = Release|Any CPU
{E56FFD91-590E-442A-910B-CC88C92AE553}.Release|Win32.Build.0 = Release|Any CPU
{B7F08BEE-39ED-4F1A-AA06-3BADE320288B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B7F08BEE-39ED-4F1A-AA06-3BADE320288B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B7F08BEE-39ED-4F1A-AA06-3BADE320288B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{B7F08BEE-39ED-4F1A-AA06-3BADE320288B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{B7F08BEE-39ED-4F1A-AA06-3BADE320288B}.Debug|Win32.ActiveCfg = Debug|Any CPU
{B7F08BEE-39ED-4F1A-AA06-3BADE320288B}.Debug|Win32.Build.0 = Debug|Any CPU
{B7F08BEE-39ED-4F1A-AA06-3BADE320288B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B7F08BEE-39ED-4F1A-AA06-3BADE320288B}.Release|Any CPU.Build.0 = Release|Any CPU
{B7F08BEE-39ED-4F1A-AA06-3BADE320288B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{B7F08BEE-39ED-4F1A-AA06-3BADE320288B}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{B7F08BEE-39ED-4F1A-AA06-3BADE320288B}.Release|Win32.ActiveCfg = Release|Any CPU
{B7F08BEE-39ED-4F1A-AA06-3BADE320288B}.Release|Win32.Build.0 = Release|Any CPU
{0BC0E590-524E-4311-A3E9-371BE6AFF536}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0BC0E590-524E-4311-A3E9-371BE6AFF536}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0BC0E590-524E-4311-A3E9-371BE6AFF536}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{0BC0E590-524E-4311-A3E9-371BE6AFF536}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{0BC0E590-524E-4311-A3E9-371BE6AFF536}.Debug|Win32.ActiveCfg = Debug|Any CPU
{0BC0E590-524E-4311-A3E9-371BE6AFF536}.Debug|Win32.Build.0 = Debug|Any CPU
{0BC0E590-524E-4311-A3E9-371BE6AFF536}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0BC0E590-524E-4311-A3E9-371BE6AFF536}.Release|Any CPU.Build.0 = Release|Any CPU
{0BC0E590-524E-4311-A3E9-371BE6AFF536}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{0BC0E590-524E-4311-A3E9-371BE6AFF536}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{0BC0E590-524E-4311-A3E9-371BE6AFF536}.Release|Win32.ActiveCfg = Release|Any CPU
{0BC0E590-524E-4311-A3E9-371BE6AFF536}.Release|Win32.Build.0 = Release|Any CPU
{8E5E44B3-92FD-4C79-AA06-7E8CBFDDBB32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8E5E44B3-92FD-4C79-AA06-7E8CBFDDBB32}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8E5E44B3-92FD-4C79-AA06-7E8CBFDDBB32}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{8E5E44B3-92FD-4C79-AA06-7E8CBFDDBB32}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{8E5E44B3-92FD-4C79-AA06-7E8CBFDDBB32}.Debug|Win32.ActiveCfg = Debug|Any CPU
{8E5E44B3-92FD-4C79-AA06-7E8CBFDDBB32}.Debug|Win32.Build.0 = Debug|Any CPU
{8E5E44B3-92FD-4C79-AA06-7E8CBFDDBB32}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8E5E44B3-92FD-4C79-AA06-7E8CBFDDBB32}.Release|Any CPU.Build.0 = Release|Any CPU
{8E5E44B3-92FD-4C79-AA06-7E8CBFDDBB32}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{8E5E44B3-92FD-4C79-AA06-7E8CBFDDBB32}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{8E5E44B3-92FD-4C79-AA06-7E8CBFDDBB32}.Release|Win32.ActiveCfg = Release|Any CPU
{8E5E44B3-92FD-4C79-AA06-7E8CBFDDBB32}.Release|Win32.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -1619,6 +1719,14 @@ Global
{02FD0BDE-4293-414F-97E6-69FF71105420} = {158087CF-AF74-44E9-AA20-A6AEB1E398A9}
{158087CF-AF74-44E9-AA20-A6AEB1E398A9} = {1AE1AC60-5D2F-4CA7-AE20-888F44551185}
{0C63EF8B-26F9-4511-9FC5-7431DE9657D6} = {75A820AB-0F21-40F2-9448-5D7F495B97A0}
{DE048114-9AE4-467E-A879-188DC0D88A59} = {4C142567-C42B-40F5-B092-798882190209}
{3E424688-EC44-4DFB-9FC0-4BB1F0683651} = {DE048114-9AE4-467E-A879-188DC0D88A59}
{A8B00252-A78E-43F2-8677-57A63CCF1ABA} = {DE048114-9AE4-467E-A879-188DC0D88A59}
{7715D094-DF59-4D91-BC9A-9A5118039ECB} = {DE048114-9AE4-467E-A879-188DC0D88A59}
{E56FFD91-590E-442A-910B-CC88C92AE553} = {DE048114-9AE4-467E-A879-188DC0D88A59}
{B7F08BEE-39ED-4F1A-AA06-3BADE320288B} = {DE048114-9AE4-467E-A879-188DC0D88A59}
{0BC0E590-524E-4311-A3E9-371BE6AFF536} = {DE048114-9AE4-467E-A879-188DC0D88A59}
{8E5E44B3-92FD-4C79-AA06-7E8CBFDDBB32} = {DE048114-9AE4-467E-A879-188DC0D88A59}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {FF877973-604D-4EA7-B5F5-A129961F9EF2}
Expand Down
6 changes: 6 additions & 0 deletions sources/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
</PropertyGroup>
<!-- Runtime dependencies -->
<ItemGroup>
<PackageVersion Include="BepuPhysics" Version="2.5.0-beta.19" />
<PackageVersion Include="BepuUtilities" Version="2.5.0-beta.19" />
<PackageVersion Include="DotRecast.Core" Version="2024.1.1" />
<PackageVersion Include="DotRecast.Detour" Version="2024.1.1" />
<PackageVersion Include="DotRecast.Recast" Version="2024.1.1" />
<PackageVersion Include="DotRecast.Recast.Toolset" Version="2024.1.1" />
<PackageVersion Include="FFmpeg.AutoGen" Version="3.4.0.2" />
<PackageVersion Include="K4os.Compression.LZ4.Legacy" Version="1.3.6" />
<PackageVersion Include="Microsoft.Management.Infrastructure" Version="3.0.0-preview.4" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\engine\Stride.Assets.Models\Stride.Assets.Models.csproj" />
<ProjectReference Include="..\..\engine\Stride.BepuPhysics\Stride.BepuPhysics\Stride.BepuPhysics.csproj" />
<ProjectReference Include="..\..\engine\Stride.Particles\Stride.Particles.csproj" />
<ProjectReference Include="..\..\engine\Stride.Physics\Stride.Physics.csproj" />
<ProjectReference Include="..\..\engine\Stride.SpriteStudio.Offline\Stride.SpriteStudio.Offline.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using Stride.Core;
Expand Down Expand Up @@ -181,7 +182,7 @@ private void RegisterAssembly(Assembly assembly)
private void RegisterCompilersFromAssembly(Assembly assembly)
{
// Process Asset types.
foreach (var type in assembly.GetTypes())
foreach (var type in GetFullyLoadedTypes(assembly))
{
// Only process Asset types
if (!typeof(IAssetCompiler).IsAssignableFrom(type) || !type.IsClass)
Expand All @@ -202,6 +203,21 @@ private void RegisterCompilersFromAssembly(Assembly assembly)
log.Error($"Unable to instantiate compiler [{compilerAttribute.TypeName}]", ex);
}
}

// Taken from https://stackoverflow.com/questions/7889228/how-to-prevent-reflectiontypeloadexception-when-calling-assembly-gettypes
[DebuggerNonUserCode]
IEnumerable<Type> GetFullyLoadedTypes(Assembly assembly)
{
try
{
return assembly.GetTypes();
}
catch (ReflectionTypeLoadException ex)
{
log.Warning($"Could not load all types from assembly {assembly.FullName}", ex);
return ex.Types.Where(t => t != null);
}
}
}

private void UnregisterAssembly(Assembly assembly)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
using Stride.Rendering;
using Stride.Rendering.Compositing;
using Stride.Rendering.Sprites;
using Stride.Engine.Gizmos;

namespace Stride.Assets.Presentation.AssetEditors.EntityHierarchyEditor.Game
{
Expand Down Expand Up @@ -59,9 +60,13 @@ public EditorGameComponentGizmoService(IEditorGameController controller)
public Entity GetContentEntityUnderMouse()
{
var pickResult = gizmoEntityPicker.Pick();
var pickedComponentId = pickResult.ComponentId;
var selectedGizmo = sceneGizmos.FirstOrDefault(x => x.IsUnderMouse(pickedComponentId));
return selectedGizmo?.ContentEntity;
var pickedComponentId = new OpaqueComponentId(pickResult.ComponentId);
foreach (var gizmo in sceneGizmos)
{
if (gizmo.HandlesComponentId(pickedComponentId, out Entity selection))
return selection;
}
return null;
}

/// <summary>
Expand Down Expand Up @@ -314,8 +319,15 @@ private void CreateGizmoEntity(Entity entity, EntityComponent component, Type gi
return;

// initialize the gizmo
var gizmo = (EntityGizmo)Activator.CreateInstance(gizmoType, component);
gizmo.InitializeContentEntity(entity);
IEntityGizmo gizmo;
try
{
gizmo = (IEntityGizmo)Activator.CreateInstance(gizmoType, component);
}
catch (MissingMethodException e)
{
throw new MissingMethodException($"{nameof(IEntityGizmo)} '{gizmoType}' must have a constructor with exactly one parameter of type '{component.GetType()}'", e);
}
gizmo.Initialize(game.Services, editorScene);

gizmo.SizeFactor = GizmoSize;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
using Stride.Engine;
using Stride.Engine.Gizmos;

namespace Stride.Assets.Presentation.AssetEditors.Gizmos
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
using Stride.Engine;
using Stride.Engine.Gizmos;

namespace Stride.Assets.Presentation.AssetEditors.Gizmos
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
using Stride.Engine;
using Stride.Engine.Gizmos;

namespace Stride.Assets.Presentation.AssetEditors.Gizmos
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Stride.Core.Mathematics;
using Stride.Editor.EditorGame.Game;
using Stride.Engine;
using Stride.Engine.Gizmos;
using Stride.Engine.Processors;
using Stride.Graphics;
using Stride.Rendering;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,15 @@ private void UpdateCamera()
cameraComponent.ViewMatrix = view;
}

public override bool IsUnderMouse(int pickedComponentId)
public override bool HandlesComponentId(OpaqueComponentId pickedComponentId, out Entity selection)
{
return IsUnderMouse();
if (IsUnderMouse())
{
selection = this.cameraComponent.Entity;
return true;
}
selection = null;
return false;
}

public bool IsUnderMouse()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.

using System;
using System.Diagnostics.CodeAnalysis;
using Stride.Core;
using Stride.Engine;
using Stride.Engine.Gizmos;

namespace Stride.Assets.Presentation.AssetEditors.Gizmos
{
Expand Down Expand Up @@ -63,9 +65,10 @@ public override float SizeFactor
}
}

public override bool IsUnderMouse(int pickedComponentId)
public override bool HandlesComponentId(OpaqueComponentId pickedComponentId, [MaybeNullWhen(false)] out Entity selection)
{
return currentGizmo != null && currentGizmo.IsUnderMouse(pickedComponentId);
selection = null;
return currentGizmo != null && currentGizmo.HandlesComponentId(pickedComponentId, out selection);
}

public override void Update()
Expand Down Expand Up @@ -94,7 +97,6 @@ public override void Update()
}

// Initialize the new gizmo
currentGizmo?.InitializeContentEntity(ContentEntity);
currentGizmo?.Initialize(Services, EditorScene);

// Set the selected and enabled state of the gizmo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System;
using Stride.Engine;
using Stride.Engine.Gizmos;
using Stride.Rendering.Lights;

namespace Stride.Assets.Presentation.AssetEditors.Gizmos
Expand Down
Loading