无法获得碰撞检测或onclick在THREE.js中工作 [英] Can't get collision detection or onclick to work in THREE.js

查看:97
本文介绍了无法获得碰撞检测或onclick在THREE.js中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我花了2天的时间尝试进行碰撞检测,然后单击要工作的对象,虽然有些运气,但还差得远。我想检测相机在场景中移动时与物体的碰撞(例如,如果它是航天飞机,并且如果撞到行星或球体,它会飞起来)。任何帮助将不胜感激。仅供参考,ShipControls是FlyControls的克隆(稍作修改)。示例: http://www.benmarshall.me/projects/playground/solar -system / index2.html

I've spent 2 days now trying to get this collision detection and click on object to work, with some luck but not close to perfect. I want to detect the camera's collision with objects as it moves around the scene (like if it were a shuttle and it would go boom if you ran into a planet or sphere). Any help would be greatly appreciated. FYI, ShipControls are a clone of FlyControls (slightly modified). Example: http://www.benmarshall.me/projects/playground/solar-system/index2.html

推荐答案

Ray 不会不支持 ParticleSystem

这篇关于无法获得碰撞检测或onclick在THREE.js中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆