求大佬们指导下!!
已知的 实时跟随是
onLoad: function () {
this.camera = this.getComponent(cc.Camera);
},
onEnable: function () {
cc.director.getPhysicsManager().attachDebugDrawToCamera(this.camera);
},
onDisable: function ()
{
cc.director.getPhysicsManager().detachDebugDrawFromCamera(this.camera);
},
lateUpdate(){
let targetPos = this.target1.convertToWorldSpaceAR(cc.v2(0,0));
var t = this.node.parent.convertToNodeSpaceAR(targetPos).y;
//设置镜头跟随
this.node.y = t;
}
Camera 如何缓冲地跟随人物居中?