本文介绍了无效的表达式术语')'_的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿所有人 


有错误我找不到问题这里是代码。




使用UnityEngine;
$


公共类< g class =" gr_ gr_121 gr-alert gr_gramm gr_inline_cards gr_run_anim样式multiReplace"数据-GR-ID =" 121" id =" 121">移动:< / g> MonoBehaviour {

$
  &NBSP;公共转换目标;



  &NBSP; public float smoothSpeed = 0.125f;

  &NBSP;公共Vector3抵消;



  &NBSP; void FixedUpdate()

  &NBSP; {

  &NBSP; &NBSP; &NBSP; Vector3 despriedPostion = target.position + offset;

  &NBSP; &NBSP; &NBSP; Vector3 smoothPostion = Vector3.Lerp(transform.position,despriedPostion,);

  &NBSP; &NBSP;   

  &NBSP; &NBSP; &NBSP; transform.position = smoothPostion;

  &NBSP; &NBSP; &NBSP; transform.LookAt(target);

  &NBSP; }




}

解决方案

Hey Everyone 

There is the error I can not find the problem here is the code.


using UnityEngine;

public class <g class="gr_ gr_121 gr-alert gr_gramm gr_inline_cards gr_run_anim Style multiReplace" data-gr-id="121" id="121">Move :</g> MonoBehaviour {

    public Transform target;

    public float smoothSpeed = 0.125f;
    public Vector3 offset;

    void FixedUpdate()
    {
        Vector3 despriedPostion = target.position + offset;
        Vector3 smoothPostion = Vector3.Lerp(transform.position, despriedPostion,);
        
        transform.position = smoothPostion ;
        transform.LookAt(target);
    }


}
解决方案


这篇关于无效的表达式术语')'_的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-24 08:29