public override void SetFoveationParameters(float focalPointX, float focalPointY, float foveationGainX, float foveationGainY, float foveationArea)
{
SvrSetFoveationParameters(focalPointX, focalPointY, foveationGainX, foveationGainY, foveationArea);
}
public override int GetTrackingMode()
{
return SvrGetTrackingMode();
}
public override void SetPerformanceLevels(int newCpuPerfLevel, int newGpuPerfLevel)
{
SvrSetPerformanceLevelsEventData((int)newCpuPerfLevel, (int)newGpuPerfLevel);
IssueEvent (RenderEvent.SetPerformanceLevels);
}
public override void SetFrameOption(FrameOption frameOption)
{
SvrSetFrameOption((uint)frameOption);
}
public override void UnsetFrameOption(FrameOption frameOption)
{
SvrUnsetFrameOption((uint)frameOption);
}
public override void SetVSyncCount(int vSyncCount)
{
SvrSetVSyncCount(vSyncCount);
}
public override bool RecenterTracking()
{
//IssueEvent (RenderEvent.RecenterTracking);
return SvrRecenterTrackingPose();
}本章节中将继续介绍SvrPluginAndroid脚本中的其他代码
方法:SetFoveationParameter调用底层SetFoveationParameters方法设置左右眼Camera的Fov。
GetTrackingMode方法调用底层的SvrGetTrackingMode方法返回当前VR模式的运行模式。
SetPerformanceLevel方法重新设置当前的cpu和gpu的运行等级。
setvSyncCount方法设置当前的Vsync值。
RencenterTracking方法会调用底层的SvrRecenterTrackingPose方法,重定位头部朝向,并返回重定位是否成功。
本文介绍了SvrPluginAndroid脚本中的关键方法,包括设置注视点参数、获取跟踪模式、调整性能级别、设置垂直同步计数及重新定位头部朝向等。这些方法通过与底层系统的交互来优化VR体验。
1300

被折叠的 条评论
为什么被折叠?



