I’ve had trouble with implementing one thing in my game for about three weeks now.
The concept is that there is a first-person gameplay where the player only sees an arm with a tool attached to it. The arm itself is simply a child component (and a tool is a child to the arm) to the character. But the arm is not supposed to work based on created animations, but on physics, because the tool will interact with other objects in a scene with its momentum. The ‘F’ keyboard key would enable the “arm manipulation mode”, so that you could rotate the arm to make the tool collide with other objects.
There are two significant problems that appeared after trying to implement such behaviour:
- Converting mouse location to world space does not work poperly as after some time of moving mouse without “arm manipulation mode” enabled, turning it on again changes the arm rotation according to the new mouse relative position (the mouse could for example be in the screen corner when the mode is enabled an consequently the arm rotates towards the screen corner).
- Enabling any kind of physics options to the arm (I really tried all combinations in Physics and Collision tabs for the arm and the tool) makes it either fall on the ground or appear some distance from the character in a completely solid non-movable state or do any sort of another buggy thing.
I spend a really huge amount of time to find a solution to these problems and it apparently exceeds my knowledge.
I would strongly appreciate any help