当前位置:网站首页>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
边栏推荐
- neo4j community与neo4j desktop冲突
- 微服务系统设计——分布式定时服务设计
- Matlab | visualization of mathematical properties related to three interesting circles
- Web3还没实现,Web5乍然惊现!
- 022 basics of C language: C memory management and C command line parameters
- Installing MySQL on Windows
- 关于元器件封装的一些文章和一下我的体会
- 009 basics of C language: C loop
- stm32单片机引脚_如何将单片机的引脚配置为上拉输入
- 微服务系统设计——分布式缓存服务设计
猜你喜欢
随机推荐
Vue学习笔记(五)Vue2页面跳转问题 | vue-router路由概念、分类与使用 | 编程式路由导航 | 路由组件的缓存 | 5种路由导航守卫 | 嵌套路由 | Vue2项目的打包与部署
日志收集系统
Terminal in pychar cannot enter the venv environment
微服务系统设计——消息缓存服务设计
math_ Number set (number set symbol) and set theory
014 C language foundation: C string
重映像(STM32)
深潜Kotlin协程(十五):测试 Kotlin 协程
EPICS记录参考5 -- 数组模拟输入记录Array Analog Input (aai)
How to make ef core 6 support dateonly type
015 basics of C language: C structure and common body
021 C语言基础:递归,可变参数
【C语言】关键字的补充
How to systematically learn LabVIEW?
缓存综合项目--秒杀架构
leetcode-20. Valid parentheses -js version
018 basics of C language: C file reading and writing
Edge在IE模式下加载网页 - Edge设置IE兼容性
Almost because of json Stringify lost his bonus
jq怎么获取倒数的元素









