随笔分类 - cocos creator 3.8
摘要:1、在物体的固定方向和距离放一个node1 2、 node.setPosition(this.node1.getWorldPosition()); node.setRotation(this.node1.getWorldRotation()); node.setScale(this.node1.ge
阅读全文
摘要:let v = 100; let v3 = new Vec3(this.cylinder.forward.x * v, this.cylinder.forward.y * v, this.cylinder.forward.z * v); this.cylinder.getComponent(Rigi
阅读全文
摘要:放到BoxCollider里了。setPosition到外面就好了
阅读全文
摘要:start() { input.on(Input.EventType.MOUSE_DOWN, this.onMouseDown, this); } onMouseDown(event: EventMouse) { switch (event.getButton()) { case EventMous
阅读全文
摘要:物体加刚体和碰撞组件 地面加静态刚体和碰撞组件(不静态就会被砸着往下走) 不加碰撞组件就会穿过去
阅读全文
摘要:放进去的图类型是Texture。要改成sprite-frame才能作为sprite的Sprite Frame
阅读全文
摘要:Camera 设置为 Player 的子节点。 这样 Camera 就会跟随 Player 的移动而移动了。
阅读全文

浙公网安备 33010602011771号