So i have a Drone that can be controlled by the player, but can also be picked up and placed by the player. The drone Currently uses character movement component which appears to be tied to the Capsule component. The issue with this is that a drone is not capsule shaped.
Which means when playing as the drone operator, the drone rolls away when you put it down. Currently 2 of us have tried and have not yet succeeded to fix this.
It seems like a strange restriction to tie the movement specifically to the capsule, so i am thinking we should be able to swap the default collision class in the constructor of the Character class in C++? Will this work, or is this going to cause more issues?
Otherwise it has been pretty tricky to resolve this, adding a seperate collision seems to cause all sorts of unexpected issues. Currently our 2 alternate solutions are either - Lock the rotation of the character, which will mean it moves weirdly but cant roll away anymore, or create a dummy object that marks the location of where the drone will spawn and swap it in when activated. Neither of these solutions are perfect, so ideally hoping that a C++ swap of the default collision class is possible
The behavior that’s conflicting with the intended mechanics of your character is about the Character Movement Component which comes with the Character class.
Answering what you actually meant here:
Not possible. The Character Movement Component is designed to work with the capsule component, you cannot simply swap the capsule with another shape in C++.
Indeed, because collision volumes serve the purpose of detecting collisions, not to handle movement.
Now, to achieve the behavior you’re looking for, you’ll need to abandon the Character class. And actually, you’d already use a Pawn class for what you’d expect of a drone, Character class is not what you’d go for that. There you can use the Floating Pawn Movement component which definitely fits your use case. If you like you can of course handle the movement yourself using C++ (even making that from scratch is easier than altering the char move comp btw) but like I explained, using a Pawn class with the Floating Pawn Movement component is already what you’re looking for.
Yep definitely helps, has confirmed that converting to a floating pawn is the way forward. I had explored this some time ago, but i moved away from it for some reason. I cant remember if it was purely because there was no gravity implemented for it or if there was more annoying reasons. At that time i wasn’t as familiar with C++ though so i think now i will find it easier to update the floating pawn movement to fit requirements.
The floating pawn movement is described as simplistic, aside from gravity and momentum ( which i have just read are missing) are there any other elements that may need to be implemented in the class that might be waiting for me ?
I need to rewrite the flying mechanics to match real drones anyway, so i may as well bite the bullet.