This past week I have worked on getting my code to work to get the water simulation to work. I have used that content processor to load the models ( cube and cylinder). In the update function I define a zone for each shape with its vertices. To decide how the cylinder's velocity is affected, I check how many vertices of the cylinder are in the cube zone and multiply the percentage by a velocity change. So when the cylinder is within the cube its velocity changes. I have added another cube to get the cylinder going back and forth between the two cubes.
No comments:
Post a Comment