Skip to content

How to make a rigid body float on water from t = 0. #264

Answered by janbender
fluidkocy asked this question in Q&A
Discussion options

You must be logged in to vote

Ah, okay. Start the simulation where the body is dropped on the fluid surface. Export particle data (bgeo) and rigid bodies (obj). When everything comes to rest, stop the simulation. Take the last exported bgeo and obj file and set up a new scene.

The fluid part should look like this:

"FluidModels": [
		{
			"particleFile": "lastframe.bgeo",
			"translation": [-2.0, 0.1, 0.0],
			"rotationAxis": [0, 1, 0],
			"rotationAngle": 0,
			"scale": [1, 1, 1]
		}
	]

Add a rigid body using the last obj file and give it an inital velocity or animate it (see example AnimatedBody_2D.json).

Hope that helps.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@fluidkocy
Comment options

Comment options

You must be logged in to vote
1 reply
@fluidkocy
Comment options

Answer selected by fluidkocy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants