Jump to content

Search the Community

Showing results for tags 'nodereference'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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
    • Feeback for UNIGINE team
    • Bug Reports
    • Unigine SDK Beta feedback
  • Community
    • Collaboration
    • Tools, Plugins, Materials & Tutorials
    • Showcase
    • General Discussions
  • Legacy
    • UnigineScript

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...

Found 6 results

  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.
  2. Hello. I noticed that if I use NodeReference in world, then in runtime when I get all the nodes in the world using the following code: var nodes = new List<Node>(); World.get().getNodes(nodes); I see that all nodes have duplicates. For example if the project has NodeReference named A with 2 nested ObjectMeshStatic objects: B and C. Then in the nodes list we get the following nodes: NodeReference named A, NodeDummy named A - in the amount of 2, ObjectMeshStatic named B - in the amount of 2, ObjectMeshStatic named C - in the amount of 2. Herewith first NodeDummy object is enabled and second is disabled Please explain what is the meaning of such duplicates. Next question: I need to delete NodeReference from world in runtime. I use code like this: Editor.get().removeNode(nr.getNode()); nr.destroyPtr(); //where nr is NodeReference variable It seems like it works alright but after that we still have one NodeDummy object in current world. This object is disabled but still present in world and takes memory. I want to be able to delete NodeReference completely. How to do this?
  3. I need to work with NodeReference from another .world, which was loaded in code. Unigine::World::get()->loadWorld("../../mission_demo_server/data/mission_demo_server.world"); Unigine::World::get()->setAutoReloadNodeReferences(1); I can get node by getNodeByName(), i can cast to NodeReference, but if i get getReference() for a working with nodes of this NodeReference, it will be return null adress. If i do same in project where this .world is native, it will work rigth. NodeReferencePtr temp_ref = NodeReference::cast(Editor::get()->getNodeByName("triton_test")); m_tnpa = temp_ref->getReference(); Where am I wrong?
  4. Hi, I observed that Editor2 (SDK 2.6.1) crashes at the moment of applying edit of NodeReference by Apply button in editor in the case of using nodes from such NodeReference somewhere in UnigineScript in update function e.g.: void update() { ... nodeFromReference.getWorldPosition(); ... } Here nodeFromReference is not nulled at this time so I can't prevent it. As I see is a Editor issue.
  5. Hi, I observed that in some cases changing a param for properties inherited from node_base crash Editor2. This happens if you have multi-level inherited properties like this: To crash editor I do following: 1. Edit global param value in Properties panel (not instance at Node level), 2. Save world, 3. Reload world by world_reload cause freeze of Editor2 (crash it). But it will works if you first reload world: 1. Reload world by world_reload, 2. Edit global param value in Properties panel (not instance at Node level), 3. Save world, 4. Reload world by world_reload - this time Editor2 will be not freezed.
  6. Hi, It is possible to set Target Node of PlayerPersecutor for node enclosed in NodeReference ? Each time I try to do it via programming then Target always is set for main Node of NodeReference (not for subnode which I set).
  • Create New...