Skip to content

move objects only after gravity applied in case of gravity special - #35

Merged
larsblatny merged 1 commit into
masterfrom
moveObjectsUpdate
Jul 2, 2026
Merged

larsblatny merged 1 commit into
masterfrom
moveObjectsUpdate

Conversation

@atpellet

@atpellet atpellet commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Hi there,

I added an if statement to the moveObjects function in simulation.cpp. Now, when using gravity_special, the objects start moving only after the gravity is fully applied. I think it is preferred in most (if not all) configurations.

Let me know if you disagree.

Cheers,
AP.

@larsblatny

Copy link
Copy Markdown
Owner

Hi @atpellet This is a good idea, will merge.
Let's keep in mind that this will lead to different behavior between plates and objects: objects' positions are based on time while plates are updated based on their velocity and dt. However, I think this is fine as long as we are aware of it. Let's also consider removing the plates in the future since they can be described as objects...

@larsblatny
larsblatny merged commit 6950b7e into master Jul 2, 2026
1 check passed
@larsblatny
larsblatny deleted the moveObjectsUpdate branch July 2, 2026 14:26
@atpellet

atpellet commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

Hi @larsblatny,
Indeed, I did not know about this difference as I only use plates... If we plan on removing the plates, I suggest it should be better that object movements be based on velocity and dt by default, unless I missed something.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants