Jump to content
  • Advertisement
Sign in to follow this  

creating realistic effect of a ball hitting a net

This topic is 2561 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I think this thread belongs to this forum, it is related to Physics.

I want to create realistic effects of a ball hitting a net, or say, like a football hitting the net in the goal, or a tennis ball hitting the net in a tennis court, the net moving, stretching, and coming back etc. And i am using Unity.

I have an idea of how to do this, but since i am new to game development, i wanted to discuss it before i do anything. Here is how I think i can accomplish it:

I should create the net in sections (square sections) in, say, 3ds max, and create a stretched version of each section as well, smaller the section, the more work required, but it'll make it more realistic.

Then, i need to place the net, and when i detect collision of the ball with any of the net sections, i should move that section back, and replace the sections around it with their stretched versions, and as the ball bounces back, i should replace the stretched sections with the default ones. Collision can be detected, and speed of the ball can be tracked, so i can make changes accordingly.

Is this approach ok? And what are the better ways of doing it and other similar things? It'll be very helpful if someone points me in the right direction of how to achieve it.

And as a second question, how to create a collision of a car, the damage etc?

Share this post

Link to post
Share on other sites
You could simulate the net using 'rigid cloth'.
Implementing this might be a little difficult if this is your first foray into physics programming however.

If you are using a game engine, it might come with cloth physics.
If you are programming in C++ you could use the Bullet Physics Engine (Link).

As for how to simulate damage to a car, you can simply replace sections of the car with parts that are modeled to look like they have been damaged.

I now see you're using Unity, which supports cloth physics through NVidia's PhysX. I would use that.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!