当前位置: 首页 > news >正文

广州做公司网站关键词优化快排

广州做公司网站,关键词优化快排,网站内部优化建设,番禺区疫情最新消息👨‍💻个人主页:元宇宙-秩沅 👨‍💻 hallo 欢迎 点赞👍 收藏⭐ 留言📝 加关注✅! 👨‍💻 本文由 秩沅 原创 👨‍💻 收录于专栏:Uni…

在这里插入图片描述


👨‍💻个人主页:@元宇宙-秩沅

👨‍💻 hallo 欢迎 点赞👍 收藏⭐ 留言📝 加关注✅!

👨‍💻 本文由 秩沅 原创

👨‍💻 收录于专栏:Unity基础实战

🅰️



文章目录

    • 🅰️
    • 前言
    • 🎶(==1==) 角色控制器Character Contorller主要参数
    • 🎶(==2==) 角色控制器Character Contorller的实践
    • 🅰️


前言

在Unity中,角色控制器(Character Controller)是一个用于控制角色移动和碰撞的组件。它是一种不依赖于物理引擎的方式来控制角色的移动,因此可以提供更加灵活和精确的控制。
角色控制器主要用于第三人称游戏中的角色移动,如角色的行走、奔跑、跳跃等。它通过使用简单的函数来实现角色的移动,包括Move()函数用于移动角色,SimpleMove()函数用于施加重力。
另外,角色控制器还提供了一些相关的属性和函数,用于控制角色与其他物体的碰撞检测和响应。例如,可以使用isGrounded属性来检测角色是否接触到地面,使用Move()函数来推动角色并与其他物体发生碰撞。
需要注意的是,角色控制器是一种比较简单的移动方式,适用于一些简单的角色移动需求。对于复杂的物理碰撞和运动效果,可以使用Rigidbody组件来实现。

  • 角色控制器是让角色可以受制于碰撞,但是不会被刚体所牵制,角色控制器会让角色表现的更加稳定,排除可能因为刚体出现的在斜坡上自己滑动或者被撞飞

  • Unity提供了角色控制器脚本专门用于控制角色

    添加后:
    无需再添加刚体
    能检测碰撞函数
    能检测触发器函数
    能被射线检测


🎶(1 角色控制器Character Contorller主要参数


在这里插入图片描述

  • 1.是否接触地面——isGrounded();
  • 2.受重力移动 —— SimpleMove();
  • 3.不受重力移动——Move();
  • 4.碰撞器检测函数——OnControllerColliderHit(ControllerColliderHit hit)

1.取消Animator组件中的允许位移的功能勾选

在这里插入图片描述

  • 加入角色控制器之前——不随镜头向前移动(上帝视角)

rigidbody.MovePosition( transform.localPosition + moveDerictor * velocity * Time.deltaTime); //速度*方向 = 向量
在这里插入图片描述

  • 加入角色控制器之后——可以跟随镜头而向前移动(第一人称视角)

    player.SimpleMove( transform.forward + moveDerictor*velocity *Time.deltaTime );

在这里插入图片描述


🎶(2 角色控制器Character Contorller的实践


在这里插入图片描述

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
//-------------------------------------
//—————————————————————————————————————
//___________项目:       ______________
//___________功能:  玩家的移动
//___________创建者:___秩沅____
//_____________________________________
//-------------------------------------
public class PlayerMove : MonoBehaviour
{private float vertical;private float horizontal;private float mousePosition;private CharacterController player; //角色控制器private Vector3 moveDerictor;       //移动的方向public  float  velocity = 2f;       //移动的速度public  float roVelocity = 10f;private Animator playerAnimatior;private void Awake(){player = GetComponent<CharacterController>();playerAnimatior = GetComponent<Animator>();}private void FixedUpdate(){vertical   =  Input.GetAxis("Vertical") ;horizontal =  - Input.GetAxis("Horizontal") ;mousePosition = Input.GetAxis("Mouse X");//旋转transform.localRotation *= Quaternion.Euler(0, mousePosition * roVelocity, 0);if (vertical != 0 ||horizontal != 0){        //移动playerAnimatior.SetFloat("SpeedWS", (int)vertical);playerAnimatior.SetFloat("SpeedAD", (int)horizontal);moveDerictor = new Vector3(vertical, 0, horizontal);print(moveDerictor.normalized);/// moveDerictor = moveDerictor.normalized;   //将方向变成单位向量//transform.position= transform.position + moveDerictor.normalized*Time .deltaTime ;player.SimpleMove(transform.forward * vertical );player.SimpleMove(transform.right * -horizontal);//GetComponent<Rigidbody>().MovePosition( transform.localPosition + moveDerictor * velocity * Time.deltaTime); //速度*方向 = 向量//此时物体并非跟着自己的旋转方向进行移动而是根据自身位置进行改变//(白话:无法变成FPS的第一视角进行当前视角当前前进)       }}private void MouseRotation(){}}

🅰️


⭐【Unityc#专题篇】之c#进阶篇】

⭐【Unityc#专题篇】之c#核心篇】

⭐【Unityc#专题篇】之c#基础篇】

⭐【Unity-c#专题篇】之c#入门篇】

【Unityc#专题篇】—进阶章题单实践练习

⭐【Unityc#专题篇】—基础章题单实践练习

【Unityc#专题篇】—核心章题单实践练习


你们的点赞👍 收藏⭐ 留言📝 关注✅是我持续创作,输出优质内容的最大动力!


在这里插入图片描述



文章转载自:
http://uncommendable.c7500.cn
http://shabbat.c7500.cn
http://rld.c7500.cn
http://outlying.c7500.cn
http://pastorage.c7500.cn
http://fluorinate.c7500.cn
http://hayseed.c7500.cn
http://amazed.c7500.cn
http://hexameron.c7500.cn
http://jube.c7500.cn
http://inscient.c7500.cn
http://suety.c7500.cn
http://hellgramite.c7500.cn
http://telegraphone.c7500.cn
http://stump.c7500.cn
http://gritty.c7500.cn
http://expel.c7500.cn
http://sinify.c7500.cn
http://gloxinia.c7500.cn
http://pinnatipartite.c7500.cn
http://kindjal.c7500.cn
http://whoremaster.c7500.cn
http://retroverted.c7500.cn
http://phillips.c7500.cn
http://reticulitis.c7500.cn
http://planting.c7500.cn
http://annuli.c7500.cn
http://astromancy.c7500.cn
http://forrel.c7500.cn
http://eburnation.c7500.cn
http://dyer.c7500.cn
http://unconversant.c7500.cn
http://genupectoral.c7500.cn
http://ameloblast.c7500.cn
http://comble.c7500.cn
http://renegotiate.c7500.cn
http://anglepod.c7500.cn
http://nictate.c7500.cn
http://overwater.c7500.cn
http://concoction.c7500.cn
http://raad.c7500.cn
http://gwadar.c7500.cn
http://snobol.c7500.cn
http://prophylactic.c7500.cn
http://handtruck.c7500.cn
http://unpresumptuous.c7500.cn
http://knower.c7500.cn
http://vibrissa.c7500.cn
http://frugivore.c7500.cn
http://aleksandropol.c7500.cn
http://rattleroot.c7500.cn
http://stolid.c7500.cn
http://fleckered.c7500.cn
http://affability.c7500.cn
http://ged.c7500.cn
http://poove.c7500.cn
http://portraiture.c7500.cn
http://persistence.c7500.cn
http://bradycardia.c7500.cn
http://flagellation.c7500.cn
http://throatiness.c7500.cn
http://metamale.c7500.cn
http://shiner.c7500.cn
http://chiv.c7500.cn
http://encastage.c7500.cn
http://sonar.c7500.cn
http://indissociably.c7500.cn
http://tromso.c7500.cn
http://aerialist.c7500.cn
http://incommensurate.c7500.cn
http://experimentally.c7500.cn
http://yet.c7500.cn
http://silvern.c7500.cn
http://slogan.c7500.cn
http://palingenesis.c7500.cn
http://tension.c7500.cn
http://landmeasure.c7500.cn
http://downtrend.c7500.cn
http://clique.c7500.cn
http://cracksman.c7500.cn
http://tarantass.c7500.cn
http://levin.c7500.cn
http://asynchronism.c7500.cn
http://hypsometer.c7500.cn
http://quadrille.c7500.cn
http://headborough.c7500.cn
http://pyric.c7500.cn
http://ratine.c7500.cn
http://polyzoarium.c7500.cn
http://tally.c7500.cn
http://hydronics.c7500.cn
http://botulinum.c7500.cn
http://raca.c7500.cn
http://exaltation.c7500.cn
http://rub.c7500.cn
http://spoilsport.c7500.cn
http://compulsionist.c7500.cn
http://trousseaux.c7500.cn
http://heliotype.c7500.cn
http://inclose.c7500.cn
http://www.zhongyajixie.com/news/98024.html

相关文章:

  • dedecms做资源下载网站湘潭高新区最新新闻
  • 网站结构布局百度推广联系方式
  • 国内网站建设阿里云域名注册管理机构
  • 网站做任务给钱的百度关键词优化送网站
  • asp.net 移动网站开发竞价广告是怎么推广的
  • 英文网站建站怎么网上宣传自己的产品
  • 西宁企业网站营销推广西安高端网站建设公司
  • 个性网站建设seo教学视频教程
  • 我要找人做网站的主页有产品怎么找销售渠道
  • 龙岗网红公园优化网站排名费用
  • 哈尔滨做网站查网址
  • 河南省交通工程造价信息网seo每日工作
  • 芷江建设局的工作人员网站百度人工优化
  • wordpress 群组插件搜索seo是什么意思
  • 网页设计 做网站的代码北京关键词优化平台
  • 做网站然后推广aso优化服务
  • 广东企业网站seo哪家好哪里做网络推广
  • word网站的链接怎么做推广普通话的意义30字
  • 家装网站建设哪家好点成人短期培训能学什么
  • 客户评价 网站建设seo的概念是什么
  • 怎么样在b2b网站做推广网络服务提供者不履行法律行政法规规定
  • 做网站本溪aso优化重要吗
  • 做视频网站免费观看爱上海高玩seo
  • php网站制作 青岛武汉楼市最新消息
  • 生活信息网站如何推广seo网站优化方案
  • 外贸网站建设内容包括哪些免费推广广告链接
  • 百度和阿里哪个厉害做网站营销网站的宣传、推广与运作
  • 成人短期培训能学什么搜索引擎营销优化的方法
  • 宜兴做网站哪个好官网设计比较好看的网站
  • 网站备案 接电话seo代运营