Tank physical model (ODE)

Source: Internet
Author: User
Ode is used to simulate the movement of tanks. tanks are not like normal four-wheeled vehicles (hing2 can be used to implement wheels). To provide power for the tracks at the ground contact, contact motion is used, it was originally used to achieve the conveyor belt effect.

Method: a tank is combined with a crawler. The tank body uses box Geom, and the two tracks are replaced by two boxes Geom.
The dynamic speed (surface line speed) of the two tracks is calculated, and the forward vector of the tank is saved.
When the crawler is detected to be in contact with the ground, set dcontactmotion1 to the crawler rotation speed and contactslip to 1e-5, making the crawler not easy to slide on the ground. Soft_cfm is set to 0 (the ground is hard and non-elastic), and fdir1 is set to the forward vector direction of the tank. The friction coefficient must be larger.
The crawler speed needs to be dynamically adjusted according to the current contact speed on the ground to prevent the tank from being tilted up due to a large speed difference.
In practice, I feel good when I climb and turn, but sometimes there are slight fluctuations on the surface that block the crawler box. You can consider adding a skewed box before and after the tank to simulate the angle of the track.

There is also a tank physical model. Unlike my practice, it uses ray to detect if the crawler is in contact with the Earth's surface and directly applies an additional force to the left and right sides of the tank to drive the tank. The results are also good.
Http://www.mindcontrol.org /~ Hplus/carworld.html

But after all, it's just a game that has the opportunity to manipulate the tank.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.