I want to get collision between spawn objects.
So I use “On contact” node or “On volume trigger” node but it seems isn’t working I expected.
For example on this file, spawn cube and sphere(Press “F” ”J”) will remove when they contact.
But it isn’t working!
Please give me your idea for solution.
Blender: 2.83.4 (2.83.4 2020-08-05)
OS:Mac OS 10.13.6
The wiki documentation states that the required version of Blender is 2.82.
I ran the project on 2.82 and everything works.
In the documentation from July 15, version 2.83 is already written (https://github.com/armory3d/armory/wiki/setup)
Then the question is open.
P.S. Update from Git, maybe already corrected
Is it works “On contact” node or “On volume trigger” node in node tree?
Sorry, I stepped.
Does not work. I believe that the problem is in the wrong organization. You are checking the wrong objects. You point to objects in the scene while creating other objects. And it turns out that the objects in the scene never touch.
It is necessary to bind a script with a contact check to an object.
Now I’m throwing an example
Here’s an example.
The scripts for deletion are bound to objects. The cube is removed on the “On volume trigger” event, the sphere on the “On contact” event.
collision_test_attach_script.blend (822.1 KB)
P.S. I wrote a lot of unnecessary things, sorry. It was necessary to take a closer look at the issue, the language barrier.
I checked your example.
Mm…I forgot to write,
I want to remove objects when contact Cube and Sphere.
I know “On contact” node or “On volume trigger” node work between spawn objects and originally objects.
I want to use these nodes when I create shooting game,
like that shoot the spawn enemies.
Fired bullets are spawn objects and Spawn enemies are spawn objects.
I don’t use English usually so maybe reply was hard to read.
I try to write as smartly as possible.
Then you need to check not 2 specific objects, but check what your object collided with. Use the “Get contacts” node on the created object, so you get an array of objects that your object will collide with. Now you need to check specifically
Options for checking object collisions (in my opinion):
- Add a property with objects and check it;
- When creating objects, add a parent to them (or to a collection) and check it already.
Example - collision_test_contact_dynamic.blend (912.6 KB)
P.S. I don’t speak English either. I use a translator
Thanks a lot your idea!
I tried a lot but it didn’t work…
But I got alternative way(It looks cheat )
I’ll challenge this question again later.
Thanks your help!
You are welcome!