武汉江夏腾讯子公司腾讯互娱搞三维动画师怎么样呀 |
void Update ()
{
float h = Input.GetAxis ("Horizontal");
Vector3 vSpeed = new Vector3 (this.transform.forward.x, this.transform.forward.y, this.transform.forward.z) * moveVSpeed;
Vector3 hSpeed = new Vector3 (this.transform.right.x, this.transform.right.y, this.transform.right.z) * moveHSpeed * h;
Vector3 jumpSpeed = new Vector3 (this.transform.up.x, this.transform.up.y, this.transform.up.z) * jumpHeight * m_jumpState;
this.transform.position += (vSpeed + hSpeed + jumpSpeed) * Time.deltaTime;
Vector3 vCameraSpeed = new Vector3 (this.transform.forward.x, this.transform.forward.y, this.transform.forward.z) * minVSpeed;
cameraTransform.position += (vCameraSpeed) * Time.deltaTime;
}
人物是移动的
@hf8813264 我的意思你阔以做一个这样的接口-_-\,这么看moveVSpeed和moveHSpeed是类变量,写个加个置零的stop接口,在你那个trigger里调用。
@GavinPayne 恩,因为初学,不太懂,想知道unity里面有没有类似于自带的那种发生碰撞之后被阻挡住的效果
@Jenny_jingxue 哈哈,我是自学着打发时间的,不是专业的,没法胜任了
过早客微信公众号:guozaoke • 过早客新浪微博:@过早客 • 广告投放合作微信:fullygroup50 鄂ICP备2021016276号-2 • 鄂公网安备42018502001446号