用户:
SCS_user_i1eril0dUy查看:108 回复:9 评论:5 创建时间:2023-02-18T18:06:42
为什么我的代码像这样
world.onPress(async({eentity,raycast:{direction}})=>{
while(entity.player.action0button){
shoot(entity,direction)
await sleep(speed[entity.player.hand])
}
})
//shoot函数用的是bullet(模型).velocity.copy(direction)
的时候往-x方向发射子弹能正常发射,但往+x方向会打偏?
PlumSteven你复制过来,不然格式很乱,很难看懂
点赞0
评论
world.onPress(async({eentity,raycast:{direction}})=>{ while(entity.player.action0button){ shoot(entity,direction) await sleep(speed[entity.player.hand]) } }) shoot函数用的是bullet.velocity.copy(direction)
不是啊喂,这样更乱了,我说你复制到编辑代码的里面
你帖子怎么发代码的就怎么发
SCS_user_i1eril0dUyworld.onPress(async({eentity,raycast:{direction}})=>{
while(entity.player.action0button){
shoot(entity,direction)
await sleep(speed[entity.player.hand])
}
})
//shoot函数用的是bullet(模型).velocity.copy(direction)点赞0
评论