View Code? Open in Web Editor
NEW
Unity plugin for control camera in scene.
License: MIT License
mgs.camera's Introduction
- Unity plugin for control camera in scene.
- Translate camera by mouse pointer drag.
- Camera rotate around target gameobject.
- Camera smooth align to mark gameobject.
- Unity 5.0 or above.
- .Net Framework 3.5 or above.
- Calculate camera position base on mark center gameobject.
- Calculate camera position and rotation base on mark target gameobject.
- Smooth lerp position and rotation of camera.
- MouseTranslate : Translate gameobject by mouse pointer drag.
- AroundCamera : Camera rotate around target gameobject.
- AroundAlignCamera : Camera rotate around target gameobject and align to mark gameobject.
- MouseFocus : Align camera to gameobject on mouse pointer double click it.
- AlignMark : Mark gameobject as align target and config align parameters.
- Demos in the path "MGS-Camera/Scenes" provide reference to you.
![Around](./Attachment/README_Image/Around.gif)
![Focus](./Attachment/README_Image/Focus.gif)
mgs.camera's People
Contributors
mgs.camera's Issues
目前我用在项目里,有两个问题
1.AlignMark 如果我动态修改 AlignTarget.angleRange(根据相机当前的欧拉角),有几率无法完全进入AlignMark,可能是小数点的关系.我转换的时候设置成整数就好了.
2.MouseTranslate 没有关闭和reset入口,比如我鼠标在UI上操作我希望他不要检测鼠标了(这个我通过修改鼠标按钮id解决了,但是实在是无奈之举)
以及,我希望整个场景只有一个MouseTranslate,根据我鼠标选择的物体,会自动修改MouseTranslate的位置到那个选中的物体上,但是MouseTranslate自身锁死了位移.
只要我把相机上挂载的AroundAlignCamera脚本去掉,相机的DoTween动画就可以正常执行,否则就无反应,请问这是什么原因?