当前位置:网站首页>Unity skframework framework (XVIII), roamcameracontroller roaming perspective camera control script
Unity skframework framework (XVIII), roamcameracontroller roaming perspective camera control script
2022-07-02 13:07:00 【CoderZ1010】
Catalog
One 、 brief introduction
RoamCameraController Is a camera control script for roaming Perspective , Support at the same time Input System Package(New) and Input Manager(Old) new 、 The old two input systems .
The tool has been uploaded to my framework SKFramework Development toolbox in , As shown in the figure .
The framework is already in Github Open source , Address :https://github.com/136512892/SKFramework
Two 、 function
1. Keyboard controls movement
Via keyboard W、S、A、D、E、Q Press the key to move forward 、 after 、 Left 、 Right 、 On 、 Move down :
2. Zoom in and out
Through the scrolling of the mouse wheel, the angle of view is shortened or widened , The effect is equal to W、S Key :
3. Angle of view rotation
Rotate the viewing angle by holding down the right mouse button and dragging :
By setting verticalLimitMax、verticalLimitMin To limit the rotation angle in the vertical direction , To prevent the camera ” Handstand “.
4. Perspective focus
By calling Focus Function to realize the focus of perspective :
/// <summary>
/// focusing
/// </summary>
/// <param name="position"> Target location </param>
/// <param name="rotation"> Target rotation </param>
/// <param name="duration"> Duration </param>
public void Focus(Vector3 position, Vector3 rotation, float duration);
5. Activity area restrictions
By enabling IsRangeClamped To limit the scope of activities :
By setting xMinValue...zMaxValue Adjust the range of activities , As shown in the figure , The area formed by the green line is the range of activities , The camera will not move beyond this area :
3、 ... and 、 Core variables
toggle: Switch of control system
isRangeClamped: Whether to enable active area restriction
xMinValue、xMaxValue: stay x Range of active areas on the axis , When isRangeClamped by true It works
yMinValue、yMaxValue: stay y Range of active areas on the axis , When isRangeClamped by true It works
zMinValue、zMaxValue: stay z Range of active areas on the axis , When isRangeClamped by true It works
translateSpeed: The speed of movement
boost: Acceleration factor , When pressing... On the left of the keyboard Shift Key will accelerate the movement
positionLerpTime: The time required for coordinate interpolation to the target value
rotationLerpTime: The time required to rotate the interpolation to the target value
mouseMovementSensitivity: Mouse sensitivity
mouseScrollMoveSpeed: The speed at which the viewing angle gets closer and farther when the mouse wheel rolls
invertScrollDirection: Whether to reverse the direction in which the viewing angle is closer and farther when the mouse wheel is scrolled
invertY: Whether to reverse the direction of rotation in the vertical direction
verticalLimitMax: The maximum angle of rotation in the vertical direction
verticalLimitMin: The minimum angle of rotation in the vertical direction
边栏推荐
- Unity SKFramework框架(十六)、Package Manager 开发工具包管理器
- 模数转换器(ADC) ADE7913ARIZ 专为三相电能计量应用而设计
- js1day(输入输出语法,数据类型,数据类型转换,var和let区别)
- Analog to digital converter (ADC) ade7913ariz is specially designed for three-phase energy metering applications
- Linear DP acwing 895 Longest ascending subsequence
- Jerry's weather direction coding table [chapter]
- Js4day (DOM start: get DOM element content, modify element style, modify form element attributes, setinterval timer, carousel Map Case)
- Interesting interview questions
- 国内首款、完全自主、基于云架构的三维CAD平台——CrownCAD(皇冠CAD)
- Traverse entrylist method correctly
猜你喜欢
移动式布局(流式布局)
Heap acwing 838 Heap sort
The redis development document released by Alibaba covers all redis operations
8 examples of using date commands
Direct control PTZ PTZ PTZ PTZ camera debugging (c)
Js8day (rolling event (scroll family), offset family, client family, carousel map case (to be done))
js1day(输入输出语法,数据类型,数据类型转换,var和let区别)
bellman-ford AcWing 853. Shortest path with side limit
spfa AcWing 851. SPFA finding the shortest path
Floyd AcWing 854. Floyd finds the shortest path
随机推荐
Jerry's weather direction coding table [chapter]
Oracle from entry to mastery (4th Edition)
Unity SKFramework框架(十五)、Singleton 单例
移动式布局(流式布局)
传感器 ADXL335BCPZ-RL7 3轴 加速度计 符合 RoHS/WEEE
[opencv learning] [template matching]
完全自主可控三维云CAD:CrownCAD便捷的命令搜索,快速定位所需命令具体位置。
PR usage skills, how to use PR to watermark?
Use MySQL events to regularly perform post seven world line tasks
Unity SKFramework框架(十七)、FreeCameraController 上帝视角/自由视角相机控制脚本
Docsify deploy IIS
Unity SKFramework框架(十二)、Score 计分模块
8A 同步降压稳压器 TPS568230RJER_规格信息
面渣逆袭:MySQL六十六问,两万字+五十图详解!有点六
挥发性有机物TVOC、VOC、VOCS气体检测+解决方案
自主可控三维云CAD:CrownCAD赋能企业创新设计
NTMFS4C05NT1G N-CH 30V 11.9A MOS管,PDF
Sensor adxl335bcpz-rl7 3-axis accelerometer complies with rohs/weee
Traverse entrylist method correctly
LTC3307AHV 符合EMI标准,降压转换器 QCA7005-AL33 PHY