I want to make a game that the player can move in a 3d space model. When clicking the floor, the player can move to the point with constant speed, and he can not pass through the wall.
But I have trouble about moving the player(camera).
As you can see, the camera can rotate normally, but when you click the floor, though the camera can move to the point, the viewport reseted unexpectly.
When the camera collide with the wall, it will fall down, or knock off, or jitter.
Problem 1 can be solved by adding a entity as the camera’s parent, and add the rigidbody and collision component to it, remove the camera’s rigidbody and collision component.
When rotating the camera, just set the camera’s local eulerangles, when moving, just apply force to the parent entity or set the parent entity’s linear velocity.