vinograd2702 Posted December 10, 2023 Share Posted December 10, 2023 Hello everyone! I'm doing my student project using physical triggers. I need to implement fairly simple functionality. I have a router and a bit attached to it. A primitive is also implemented, to which a physical trigger and a script are attached, which contains an integer - its age. It is necessary to make sure that upon contact with the cutter, the cube checks the value of its age and, if it is greater than 1, it is removed and creates 8 descendants of the same cubes, but half as large and with an age of 1 less, fills the entire volume with them and leaves. If the age value is 1, then the cube is simply removed. I have implemented a NodeReference which has a mesh and a physics trigger. There is also a script attached to the cube. The cutter has a cylindrical collider. On first contact everything works correctly. But the descendants react to the cutter earlier than necessary. That is, when the cutter has not yet come into contact with them. The result is holes of larger diameter and with indentations along the height of the cylinder. That is, the collider seems to be capsule and not cylindrical. If anyone has thoughts on this, I'd love to hear them. Thank you all in advance! I am attaching a draft of the scene, a photo of the cutter in action and a script for the workpiece. VoxelLogic.cs QUASER MV184 Model.zip Link to comment
silent Posted December 11, 2023 Share Posted December 11, 2023 vinograd2702 The only suspicions part in your code is actually located in line 43: child[i].Scale = child[i].Scale * sizeChild / 0.128f; Objects that are affected by physics can't be scaled (they should have scale set to 1). There is a small warning in our documentation in the Collision and Intersection detection section: https://developer.unigine.com/en/docs/2.17/principles/physics/?rlang=cpp#collision_intersection Thanks! 1 How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
vinograd2702 Posted December 13, 2023 Author Share Posted December 13, 2023 Thank you for your help! Taking into account the impossibility of changing the size of objects with physics, each size of the cube had to be created separately. Now, when changing model parameters, you have to perform more actions, but the model works correctly! 1 Link to comment
werner.poetzelberger Posted December 13, 2023 Share Posted December 13, 2023 (edited) This looks very interesting! Do you have a video of "milling" something? Cheers Werner Edited December 13, 2023 by werner.poetzelberger Link to comment
Recommended Posts