Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hello. The first problem: I attached the weapon to the arm bone, but the weapon goes through the wall. Is there any way to fix this? The second problem is with displaying the material on the weapon. The weapon is not visible on the fingers. |
||||
|
Use this function from the docs to move the gun away from the wall: ccbGetCollisionPointOfWorldWithLine(). You can probably do the same thing with the Shoot action. I don't understand what you mean with your second problem. |
||||
|
Just set your collider out of the bounds of the weapon..easy... You can also reset the collider dynamically in various ways when you approach the wall....not hard |
||||
|
Guest wrote: Use this function from the docs to move the gun away from the wall: ccbGetCollisionPointOfWorldWithLine(). You can probably do the same thing with the Shoot action. I don't understand what you mean with your second problem. |
||||
|
I attached the weapon to the arm bone, but the weapon goes through the wall. Is there any way to fix this? This happens due to a bug in CopperCube. FPS camera behavior has a property which is called something "disable clipping for child nodes" or similar. This setting allows all models attached to the camera stay on top of all other 3d models. The bug is that it only work for the direct children, i.e. your model node should be right under the camera node. Since in your case it's not a direct child, it's child of the joint arm bone, the behavior doesn't work as expected. I believe you can fix it like: 1. Add a dummy node to you arm bone joint. Dummy node is a node without any geometry, i.e. create a sphere with 0 polygons and 0 radius. Set it to 0,0,0 position, so it's in the same exact place there your arm bone joint is 2. Place weapon under you camera node, so they are direct relatives. 3. Add a behavior, there you get dummy node position and rotation and apply it to the weapon node. I never tried that, but I believe, it should work. This issue probably also causes your second problem. |
||||
|
3. Add a behavior, there you get dummy node position and rotation and apply it to the weapon node. Does this behavior need to be manually written in JavaScript? Or is it possible to customize the behavior without a script? |
||||
|
Well, I tried it myself, and it doesn't really work. The idea was quite simple: /* Unfortunately, both pos and rot are 0 vector here. But I have another suggestion - you can try using JIS's 6.7 launcherhttps://vazahat.itch.io/coppercu.... Among the other issues it fixes: -> Fixed a bug with the Disable Clipping option of FPS camera, previously it was disabling clipping for top-level children of FPS camera, now it handles Launcher fixes this 100%. |
||||
|
Fixed a bug with the Disable Clipping option of FPS camera, previously it was disabling clipping for top-level children of FPS camera, now it handles Launcher fixes this 100%. I tried the Launcher and really now there are no errors. Thank you very much) |
|