Jump to content

physic not work on syncker master for syncNode


Recommended Posts

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 by mahasan
Link to comment
  • 4 weeks later...

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

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
×
×
  • Create New...