Jump to content

physic not work on syncker master for syncNode


Recommended Posts

Posted (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 by mahasan
Posted

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:

  • 4 weeks later...
Posted

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;

}

 

Posted

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

×
×
  • Create New...