Search the Community
Showing results for tags 'Collision'.
-
Hi everyone, I started make video tutorials for Unigine 2.11.0.1 , You can see & use , This is my playlist about unigine, and I hope useful for you. Get started with 8 hours of free video tutorials full of tips you want. Playlist 1 Playlist 2 With respect Ahmad Karami a computer teacher/ author book / test engineer / solo game developer
- 8 replies
-
- 1
-
- ahmad karami
- unigine
-
(and 94 more)
Tagged with:
- ahmad karami
- unigine
- unigine2
- unigine editor 2
- tutorials
- video
- material
- objects
- terrain
- time
- lighting
- scripting
- advanced tutorial
- full tutorial
- download unigine
- install unigine
- setup unigine
- c sharp
- showcase
- demo
- help
- decal
- water
- sea
- ocean
- import
- hackathon
- build project
- particle
- particle system
- all settings
- collision
- physics
- physic
- physics ocean
- fog
- flower
- grass
- time of day
- day
- night
- wind
- field spacers
- fieldshoreline
- field shore line
- trigger
- destructible mesh
- code
- distance two object
- animation
- animation loop
- cloudlayer
- cloud
- clouds
- time lapse
- vr
- panorama
- render settings
- dof
- ray tracing
- global illumination
- cpp
- c-sharp
- examples
- text
- 3d text
- show
- hide
- message
- light
- point light
- spot light
- area light
- cloth
- clutter
- clothbody
- cloth body
- ripple effect
- gui
- ui
- sound
- soundsource
- sound sources
- audio
- sky
- field
- volume
- volumebox
- materials
- node
- water mesh
- water_base
- water pool
- احمد کرمی
- احمد کرمی بوکانی
- پدر علم بازی سازی
-
[SOLVED] How to set rigid body of the node for collision(node is created by noderef)
burakdogancay posted a topic in C++ Programming
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.- 4 replies
-
- collision
- addcontactcallback
-
(and 2 more)
Tagged with:
-
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.
-
collision visualisation, callback, mask
lightmap posted a topic in Physics, Navigation and Path Finding
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- 3 replies
-
- collision
- visualisation
-
(and 1 more)
Tagged with:
-
Contact Callbacks (setWorldTransform)
chen.chen posted a topic in Physics, Navigation and Path Finding
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! -
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?
- 1 reply
-
- PlayerActor
- Collision
-
(and 1 more)
Tagged with:
-
[SOLVED] Constraints on collision response
Linus posted a topic in Physics, Navigation and Path Finding
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? -
[SOLVED] PlayerSpectator collision detection with Objects
radeon.kuznecov posted a topic in UnigineScript
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); -
При масштабировании объектов, сильно теряется точность. Отладочный пример: 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