stride3d/stride

[Samples] Fix samples' camera controllers

开放

#367 创建于 2019年2月4日

 (2 条评论) (2 个反应) (0 位负责人)C# (886 个派生)batch import
area-Inputarea-Samplesenhancementgood first issue

仓库指标

星标
 (6,001 个星标)
PR 合并指标
 (平均合并 10天 11小时) (30 天内合并 22 个 PR)

描述

Release Type: Github

Version: commit onward

Platform(s): Any

Describe the bug Most controllers do not handle inputs correctly and are written in an overly complex manner: Here are some example issues that first person has:

  • this function should be simplified and or clarified.
  • Desired* and rotationAdaptation both are pointless, they cannot be modified from an outside source and don't impact the camera in a meaningful way.
  • Offset current entity rotation instead of relying on variables internal to the script, this would allow for multiple scripts to rotate the camera for cut-scenes and the likes.

Same for third person:

Now Orbit / Sidescroller:

There is a general lack of polish

Comments in all of those files aren't straightforward enough, it shouldn't just explain what the line does but also why we have to include it. If even the guy who wrote those files couldn't get them right there's a very big chance that most programmers won't, knowing that we might as well document thoroughly how camera controllers are implemented and what users should do when modifying or creating one to avoid those kind of issues. Again, check the changes that BasicCameraController as gone through for an idea of what we should strive for.

Additional context PR #359

贡献者指南