Skip to content

Conversation

@Doprez
Copy link
Contributor

@Doprez Doprez commented Apr 6, 2025

PR Details

This PR re-configures the old demos into a project template for users to look at how some of the features are meant to work in a playable environment.

I have also updated Bepu to the latest version which seems to fix the convex creation issue.

Related Issue

There have been a few mentions in discord about the lack of docs/examples for the Bepu library.
#2703

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My change requires a change to the documentation.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have built and run the editor to try this change out.

@Doprez
Copy link
Contributor Author

Doprez commented Apr 6, 2025

Couple more things to fix:

@Doprez Doprez mentioned this pull request Apr 6, 2025
8 tasks
@Doprez
Copy link
Contributor Author

Doprez commented Apr 6, 2025

This is pretty much done but the Car scene still has the crash issue. It was happening before the changes here though so it is not an issue created in this project. (Unless there was something done incorrectly in the Car scene specifially of course)

@Doprez Doprez marked this pull request as ready for review April 6, 2025 23:52
@Eideren
Copy link
Collaborator

Eideren commented Apr 12, 2025

Doesn't look like this is part of the samples that the project window can create, I might be missing something though ... ?

@Doprez
Copy link
Contributor Author

Doprez commented Apr 13, 2025

Sorry, you were not missing anything. I forgot to add the reference to the template file for the launcher.

Although I noticed with the template its improperly creating a separate Windows project so Im just looking into that now.

@Doprez
Copy link
Contributor Author

Doprez commented Apr 13, 2025

Ok so it turns out you must add the references to the non main scenes as root assets in the sdpkg for the template to work properly.

One final issue is the resource files not being added for some reason. Almost there though.

@Doprez
Copy link
Contributor Author

Doprez commented Apr 13, 2025

ok, now this should be mostly working again apart form the car demo due to the previous issue. Sorry again Eideren, I should have made sure to properly test the template in the launcher not just the project.

@Eideren
Copy link
Collaborator

Eideren commented Apr 15, 2025

All good, getting a

[EXEC(0,0)]: Error: [ModelAssetCompiler] Unable to find the source file 'D:/Documents/Stride Projects/BepuSample/Resources/Models/Hex.obj' for Asset [[ModelAsset] Models/Hex]

now when building the spawned project, same with the dungeon and hex models

@Doprez
Copy link
Contributor Author

Doprez commented Apr 16, 2025

hmmm
image

Also tested in my Document folder just in case:
image

Opened the scene with the models and it looks fine:
image

It also seems to load at runtime as well. Can you confirm if you see the source files in the projects resource folder? {ProjectName}\Resources\Models

@Eideren
Copy link
Collaborator

Eideren commented Apr 16, 2025

They are not part of the spawned project file - one thing to note is that the changes listed here on github specify that those files are not moved, but entirely removed from the repo.

@Doprez
Copy link
Contributor Author

Doprez commented Apr 16, 2025

good catch, for some reason the gitignores had .obj files? Not usre if there is some greater risk with removing those lines but it only added the ones I wanted in this case.

@Eideren
Copy link
Collaborator

Eideren commented Apr 20, 2025

The samples are a bit too rough right now I think. The car scene, for example, captures the mouse on start, if the user presses tab the mouse is unlocked but the scene selection menu disappears at the same time so we can't easily go back to another scene.

I think we should remove the weird platform from the car scene as well given how much of a performance issue it is at the start but even afterward. Doesn't make for a good best practice example.

And we'll also have to wait for #2722 to be merged before merging this one.

@Doprez
Copy link
Contributor Author

Doprez commented Apr 20, 2025

Sounds good, I will clean it up with a proper state machine and maybe just merge the FPS and Car scene into one in that case, it may be more interesting for users anyway.

And thank you for figuring out that crash!

@Doprez
Copy link
Contributor Author

Doprez commented Apr 20, 2025

I cleaned up the demo and removed the character and car examples as I have a plan to make a separate Bepu template dedicated to being more of a simple game example.

I will make a new PR for a template that will have an first person controller that can enter and exit a car and depepdning on my time I will try to add the same shooter functionality from the FPS demo that exists with bullet.

@Doprez
Copy link
Contributor Author

Doprez commented Apr 20, 2025

Oh I also added a couple more constraint examples (ball socket and distance).

@Eideren Eideren changed the title Create Bepu demo sample templates. feat: Create Bepu demo sample templates. Apr 26, 2025
@Eideren Eideren merged commit 6938820 into stride3d:master Apr 26, 2025
3 checks passed
@Eideren
Copy link
Collaborator

Eideren commented Apr 26, 2025

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants