Jump to content

Search the Community

Showing results for tags 'childnode'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to UNIGINE Forums
    • News & Announcements
    • Getting started
  • Development
    • Content Creation
    • World Design
    • Rendering
    • Animation
    • Physics, Navigation and Path Finding
    • UI Systems
    • Sound & Video
    • Editor
    • C++ Programming
    • C# Programming
    • Networking
    • Sim IG (Image Generator)
    • VR Discussions
    • General
  • Improving UNIGINE
    • Documentation
    • Feedback for UNIGINE team
    • Bug Reports
    • Unigine SDK Beta feedback
  • Community
    • Add-on Store (https://store.unigine.com/)
    • Showcase
    • Collaboration
    • Tools, Plugins, Materials & Tutorials
    • General Discussions
  • Legacy
    • UnigineScript

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 1 result

  1. I am trying to add collision process for nodes.I already created contactcallback for intersection and it works like charm when i implement it directly to editor with calling by function in c++.So it directly detect intersection and collision wit contact callback function. I would like to explain it with code; It works correctly with this way Unigine::NodePtr mObject1; Unigine::NodePtr mObject1parent; mObject1parent = Util::Search::getNodeRecursive("Objectparent", mReference->getNode()); mObject1 = Util::Search::getNodeRecursive("mObject1",mObject1parent); //I already added rigid body for object in unigine editor. mObject1->getObjectBodyRigid()->getBody()->addContactCallback(Unigine::MakeCallback(this,contact_callback));//contact callback function detects intersections for collision But I would like to remove Object1 from editor and add it dynamically with code. Unigine::NodePtr mObject1; Unigine::NodePtr mObject1parent; mObject1parent = Util::Search::getNodeRecursive("Objectparent", mReference->getNode()); mObject1 = Util::Search::getNodeRecursive("mObject1",mObject1parent); //I disabled object1 from editor(something like removeving from editor) //Then i added and created this object dynamically with below code: Unigine::NodeReferencePtr tObject1 = Unigine::NodeReference::create("External/Entities/Object1.node");//this nodereference has node with rigid body inside tObject1->release(); Unigine::Editor::get()->addNode(tObject1->getNode(),1); mObject1= tObject1->getNode(); mObject1->setWorldPosition(mObject1parent->getWorldPosition()); mObject1->setWorldRotation(mObject1parent->getWorldRotation()); //But unfortunately it does not get this Object1 node for collision, so below command gets trouble if we call rigid body of this node //Basically it acts like this node is not exists.But i can set its position and direction and even i can move it in any axis. mObject1->getObjectBodyRigid()->getBody()->addContactCallback(Unigine::MakeCallback(this,contact_callback)); Any help will be appreciated.
×
×
  • Create New...