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

Static position #21

Open
Nicogo1705 opened this issue Dec 9, 2023 · 2 comments
Open

Static position #21

Nicogo1705 opened this issue Dec 9, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@Nicogo1705
Copy link
Owner

//TODO : test if true
Settings a Static position via stride Transform will move it visually only. It should either set the visual back where the static is in sumulation or move the static in the simulation.

@Doprez
Copy link
Collaborator

Doprez commented Dec 11, 2023

currently Stride has a method that allows you to update the transform of a static collider.

If it doesnt effect performance much, I think the better way would be to just have the bepu transform reflect the Stride transform that way the user can move static objects without extra steps.

@Doprez Doprez added the bug Something isn't working label Dec 11, 2023
@Nicogo1705
Copy link
Owner Author

Nicogo1705 commented Dec 14, 2023

For now, we can set static position using the container. Problem is, it can desync entity Transform position & bepu position.
Also, moving a parent enitty of a static move the Transform; not the bepu world position.

https://github.com/Nicogo1705/Stride.BepuPhysics/blob/master/Stride.BepuPhysics/Components/Containers/StaticContainerComponent.cs#L31

@Eideren any hint ?
Edit : An event "Entity moved" would be nice so we can only use Body transform for static without updating all statics at each frame.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants