Jump to content

Search the Community

Showing results for tags 'Collision'.

  • 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 9 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 everyone, I would like to ask, is there any way to provide collision between two nodes? I added two objects as ".node"(FBX) file and tried to set collider on them.But unfortunately I couldn't check any collision is available between them.According to this collision I would like to give some effect like explosions on objects. simply, Unigine::NodePtr node1; Unigine::NodePtr node2; then I initialize node objects for them which is available in Unigine editor,mReference represent parent node(everything works and I can show them in Unigine engine(these two objects are available on the screen)) node1 = Util::Search::getNodeRecursive("Body", mReference->getNode()); node2 = Util::Search::getNodeRecursive("Turret", mReference->getNode()); then, I set collider for second object and first object, node1.setCollider(1); node2.setCollider(1); then, I move node1 to the node 2 object in for loop. node1.setPosition(Vec3) // it starts to move second object But unfortunately I don't know how to check they touch each other or not.Simply node1 passes node2 and goes away.(There is no tutorials for Node collision) Any help would be appreciated.
  3. Hello Working with physics in VR, and so visualizer are not render a thing in VR(https://developer.unigine.com/forum/topic/4446-turn-on-visualizer-in-vr/?tab=comments#comment-23169)... I'd like to see where player collide with scene (because of unexpected collision response sometime) 1. looking at examples - there only Body collision callbacks, how to call back for collided surfaces? for example collision of VR controller and scene: 2. I should set controller transformation with setLinearVelocity... instead of setWorldTransform to get right collisions, right? because in code for \demos\vr_template_demo_windows_2.6.0.1\source\PlayerVR\Players\PlayerVive.cpp, I see: mat4 transform = vive.getDevicePose(device_id); controller[num]->setWorldTransform(player_transform * Mat4(transform)); does it mean 'if vr_template' had controller collisions - this would not work properly? 3. how to set collision mask without VRcontroller having body assigned, only surface - in editor I can see "Surfaces->Collision mask" and Body type "none" - and it has collisions in scene https://developer.unigine.com/en/docs/2.6/code/usage/enabling_collision/?rlang=cpp&words=setcollisionmask#highlight thanks
  4. hello. I cannot get BodyRigid's contacts callbacks ,because I set the node position (by setWorldTransform) in C++. I want to control the node position through ART Track and get contacts with other BodyRigid, how can I do? I want the BodyRigid is kinematic (controlled by transform, not by force, but can get contact callback). thank you!
  5. Hi, I was trying to simulate bullet(has body) collision with a custom AI class that has a PlayerActor instance. How do I detect if the bullet has hit the PlayerActor capsule shape? Currently, from the bullet's contact callback function, I am receiving a contact with a body (of AI). I presume this body is PlayerActor class's body (playerActor.getBody()). Now that I have found this body, how do I find it's PlayerActor?
  6. I need to put constraints on the forces that are exerted on a body at any point in time. Is there a way to get the collision data calculated by the engine, but write my own collision response (for a single body)? Are there other ways to achieve the same result?
  7. Hi,all. Someone,can help with creating collision detection node "PlayerSpectator" with objects(terrain and etc)? I'm trying make it's,but it's not working with terrain(i can see from objects): ObjectDummy baseobject=NULL; Body bodybase=NULL; ShapeSphere Sphere=NULL; baseobject=new ObjectDummy(); baseobject.setWorldPosition( spectator.getWorldPosition() ); bodybase =new BodyDummy(); bodybase.setObject(baseobject); Sphere = new ShapeSphere(bodybase,10);
  8. При масштабировании объектов, сильно теряется точность. Отладочный пример: 1. basic players demo из EvaluationKIT 2. Добавить пирамиду, в основании квадрат 1*1 метр и высота 1 метр. 3. Подбежать actor(ом), коллизия точная, относительно. 4. Делаем масштабирование пирамиды по x, y, z в 5 раз. 5. Коллизия стала очень неточной. Translate: Debug sample: 1. Start basic players sample from EvaluationKIT browser. 2. Add new static mesh: pyramid with square 1*1 metr and height 1 metr. 3. Run and jump on it by PlayerActor, precision is normally. 4. Scale pyramid by x, y, z in 5 times. 5. Collision has been very inaccurate. normal.bmpscale_bug.bmp
×
×
  • Create New...