Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Update to support rigid body that need special compound shape handling #1024
Update to support rigid body that need special compound shape handling
It is a compond rigid body, but as it is not a supported rigid body type and need special physics update (through btVehicle).
Need to modify rigidbody as aromry's physic world contacts are store using armory RigidBody list, if the ojbect is not an Armory RigidBody, then RigidBody.contacts will not get them if through they are contacted.
Following is one way vehicle body can be added as rigidbody
Instead of just return the BtRigidBody pointer, with this patch, one can then above to pass in the created rigidBody and set the object as the object itself to get the controller through the btRigidBody with benefit of Armory RigidBody and rest of integration.
One reason above is necessary is for example, if there is a damage calculation such as something is throwing at the vehicle and vehicle need rigid body to calculate the damage, or vehicle passed through the finished line physic block.
There are only few lines change, the most major block is because of intend as they are in the if statement
Result implementation can be found at
with the time attack example.
There are other way to bypass this such as using another rigidbody on top of vehicle, but when test, it is harder to manage, and also had a conflict where the result object is still not the parent vehicle object.
Forgot to mention, the other use cases include the need for other traits that has rigidbody (such as KineticController/StaticController(which seem like trigger option)), where they are using rigidbody, but will not have same physics update as normal RigidBody.
The other options is create a