mahasan Posted September 4, 2018 Share Posted September 4, 2018 (edited) hello my friend I made a project that use syncker technology , master and slave works fine but when I sync a node that has rigidbody, after sync (with addsyncNode func) physic stop for this node in master but this node sync with master and has physic simulation and work okey in slave can you explain for me what's my mistake Edited September 4, 2018 by mahasan Link to comment
silent Posted September 7, 2018 Share Posted September 7, 2018 Hi Mahasan, To be able to help we need to check the code (at least). Could you please show us the code that you are running on master (as far as I understand you are modifying the existing Syncker demo)? Thanks! 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
mahasan Posted September 29, 2018 Author Share Posted September 29, 2018 Hello I made simple sample of syncker with unigine script ; The code below is the code of the project // ---------------------------------------------------------------------script Node node ; int init() { Player player = new PlayerSpectator(); player.setPosition(Vec3(0.0f,-3.401f,1.5f)); player.setDirection(Vec3(0.0f,1.0f,-0.4f)); engine.game.setPlayer(player); #ifdef HAS_SYNCKER engine.app.setUpdate(1); if (engine.syncker.getArgIsMaster()) { //----------------master part MasterInterface master = engine.syncker.initMaster( engine.syncker.getArgMasterBroadcast(), engine.syncker.getArgUdpPort(), engine.syncker.getArgTcpPort(), engine.syncker.getArgTcpPingPort(),SYNCKER_COMPRESS_QUALITY_HIGH); //get node from word (material_ball) that have physic rigid body node = engine.editor.getNodeByName("material_ball"); master.addSyncNode(node); //after run this part of code ;physic capability of node stopped for master } else { //----------------slave part engine.syncker.initSlave( engine.syncker.getArgSlaveName(), engine.syncker.getArgUdpPort(), engine.syncker.getArgTcpPort(), engine.syncker.getArgTcpPingPort(), SYNCKER_COMPRESS_QUALITY_HIGH); } #endif return 1; } int render() { #ifdef HAS_SYNCKER if (engine.syncker.getArgIsMaster()) { BodyRigid body = node.getObjectBodyRigid(); body.addTorque(vec3(0,0,0.2)); } #endif return 1; } Link to comment
alexander Posted October 1, 2018 Share Posted October 1, 2018 Hi Mahasan, Sorry, it is our mistake. Syncker's interpolation / extrapolation doesn't work correctly with the physics right now. Try to disable interpolation/extrapolation on both Master and Slave: SynckerInterface syncker = engine.syncker.getSyncker(); syncker.setInterpolation(0); Best regards, Alexander Link to comment
Recommended Posts