This content originally appeared on DEV Community and was authored by Maciej Sawicki
Today I made my drone drop a granade and explode on impact.
A problem I currently face is that when the granade is attached via a PhysicsConstraint it will contribute to a drone's mass and will slowly fall down, because there is not enough thrust. I tried to add granade's mass to up/down thrust calculations, but it didn't work. :/
Another problem is that there is no easy way of disabling a connection PhysicsConstraint. You cannot simply unbind connection from a granade to a drone. You have to swap granade with something else. I tried that, but the replacement needs to have its physics enabled and I don't want it to contribute to a mass even if it's invisible.
The solution I made is unlocking the "Linear Z limit". It means that the invisible rope the granade is connected to the drone unwinds infinitely. By default all the Linear axes are locked
This content originally appeared on DEV Community and was authored by Maciej Sawicki
Maciej Sawicki | Sciencx (2024-06-21T22:32:28+00:00) [Game of Purpose] Day 34. Retrieved from https://www.scien.cx/2024/06/21/game-of-purpose-day-34/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.