I want to constrain a Rigidbody on its own axes, for example: The object should only be able to move in its forward direction.
The constraints of the Rigidbody component are only constraining in world space, so if the object is placed with an angle this does not work…
I tried to implement a script that does this, but I have no idea how to do this…
I created an empty GameObject and rotated it like i need it. Then I put my object, which I want to move as a child under this new created GameObject. Then it works without any issues.