当前位置:网站首页>three. JS first person camera gun following
three. JS first person camera gun following
2022-06-27 05:02:00 【Jedi Hongbin】
https://stackoverflow.com/questions/29311875/three-js-pointerlockcontrols-shooting-along-y-axis
If you are using PointerLockControls And you want to add an object that stays in front of the camera , You can use the following modes :
var mesh = new THREE.Mesh( new THREE.SphereGeometry( 5, 16, 8 ), new THREE.MeshNormalMaterial() );
mesh.position.z = - 100; // some negative number
camera.add( mesh );
If you don't use it PointerLockControls, You can still use the same technology , You just need to make sure that you add the camera as a child of the scene .
scene.add( camera );
camera.add( mesh );
3、 ... and .js r.84
边栏推荐
- 【Unity】UI交互组件之按钮Button&可选基类总结
- 1.5 use of CONDA
- Système de collecte des journaux
- Quick sort (non recursive) and merge sort
- 渗透测试-目录遍历漏洞
- [BJDCTF2020]The mystery of ip
- 020 basics of C language: C language forced type conversion and error handling
- golang hello 安装环境异常【已解决】
- stm32读取IO高低电平状态
- stm32单片机引脚_如何将单片机的引脚配置为上拉输入
猜你喜欢

Kotlin compose compositionlocalof and staticcompositionlocalof

Microservice system design -- API gateway service design

微服务系统设计——消息缓存服务设计

math_数集(数集符号)和集合论

Cognition - how to fill in 2022 college entrance examination volunteers

Tsinghua University open source software mirror website

微服务系统设计——分布式定时服务设计

Qchart note 2: add rollover display

快速排序(非递归)和归并排序

微服务系统设计——统一鉴权服务设计
随机推荐
011 C language basics: C scope rules
STM32关闭PWM输出时,让IO输出固定高或低电平的方法。
Almost because of json Stringify lost his bonus
golang hello 安装环境异常【已解决】
Pycharm 中 Terminal 无法进入 venv 环境的问题
第2章 关键技术介绍
Pytest框架的执行规则
007 basics of C language: C operator
快速排序(非遞歸)和歸並排序
Kotlin compose compositionlocalof and staticcompositionlocalof
齐纳二极管 稳压二极管 SOD123封装 正负区分
躲避小行星游戏
022 C语言基础:C内存管理与C命令行参数
[BJDCTF2020]The mystery of ip
How pychart installs packages
Edge在IE模式下加载网页 - Edge设置IE兼容性
Vue学习笔记(五)Vue2页面跳转问题 | vue-router路由概念、分类与使用 | 编程式路由导航 | 路由组件的缓存 | 5种路由导航守卫 | 嵌套路由 | Vue2项目的打包与部署
018 C语言基础:C文件读写
微服务系统设计——微服务调用设计
In a sense, the Internet has become an incubator and a parent