My team and I are making a Space Shooter game. It will include 1 manned fighter ships similar in scale to modern day jet fighters. IE the same size as an F-15 or F-35.
So I have built these space fighters as skeletal meshes because I want them to have various moving parts. primarily an animated Landing Gear and a Cockpit Canopy that opens and closes.
So I have a few of these ships built and the animations all work fine when viewed in Persona.
However, I am having absolutely no joy with constructing the Physics Asset for these ships. What I really do not understand is how to achieve my desired result using PHAT. So let me explain exactly the kind of behaviour I am aiming for.
So the spaceship should have 1 single primary collision body that neatly encompasses the ships hull. Now in PHAT, thats all fine, if I have a skeletal mesh with just 1 collision body, everything is fine. However the ship needs to have a couple more collision bodies for the Landing Gear and Canopy. To make it simple lets just talk about the Landing Gear.
In PHAT when the Landing Gear is in / retracted, the ship should fall to the ground and land on it’s belly. Like this:
Lands on its belly:
But when the Landing Gear is out it should behave like this:
Fall to the ground and land neatly on it’s Landing Gear, like this:
And also theoretically, if the ship lands on it’s belly with the Landing Gear in, but then lets out the Landing Gear, the gear itself should push into the ground pushing the ship up and setting it on to it’s Landing Gear. That’s how I imagine it working any ways.
Sadly however, I have not been able to achieve any of this functionality inside PHAT. The main problem it seems to me is that what I am wanting is for the main ship collision object to work with “Default” Physics type in PHAT, and for the Landing Gear objects to work with “Kinematic” or “Simulated” (Not sure which). Because “Kinematic / Simulated” is the only way to have an animation play on the Physics object.
However if I set the bones like this, with the ships main body as “Default” and Landing Gears as “Kinematic” and try to play the anim, the whole thing just flys off the screen at a 100000mph.
I know exactly what I am trying to achieve, but really no idea how to achieve it. I have read all the PHAT documentation I can find and watched the PHAT Tutorials. But none of these really help.
Essentially what I am trying to do is have an animated object (Part of the Skeletal Mesh), IE the Landing Gears attached to the main ship body and animated and have them all have proper collision. But so far I cannot work out how to do it.
It seems to me a fairly simple goal, yet the implementation seems impossible.
Any advice or suggestions on how to set up my ships to achieve the desired effect would be most welcome. Thanks!