DEBUG HELP NEEDED, no fail, yet not understanding result,

Ok, so I have been looking @ what Raco commented, and I believe I can do this almost by myself,
but not quite yet,

here is what I am working with,

I need to somehow, use 1 script, to cast up to 30 rays, based on the properties in the cube,

if FaceProperty_01 != Empty
Cast ray from face ->FaceIndex_01

however, I have blown a brain circuit on this already, lol

After I uncross my eyes, I will be back to see if anyone has beat me to it,

Again, this game, is for everyone at blender artists,

Edit:I should take another crack at explaining this

this item, is a communication node, to pass properties from object to object,

Antenna edits Property FaceProperty_01 of cubic = “command”
cubic sees change from “empty” to command, check property FaceIndex_01 = 2
Cast ray from 2
Ray hits “Cubic 2” on face 05
cubic 1 changes cubic 2 property-FaceProperty_05 to “command”

and so on,


CubicComponetTransistorV2.blend (615 KB)

Are you using classes in your script.I think it would make it easier.

I have never tackled classes yet,

I learned most of what I know about coding from “reverse engineering” quake 1, and duke nukem,

and SecondLife (I liked it, but it broke my scripts @ every update :frowning: )

Try looking up in the search using class to make games following the OOP way.Marcoit posted the thread. That is only one example though there are many more.

Here is the cube, with all sensor textures, and all lists,

but I am not sure if I modified the hitID section correctly, as hitting face 7 should shoot a ray from 8, but it is casting from 10 instead…


CubicComponetTransistorV2.blend (615 KB)

Obi-wan your my only hope…


I would really like to help you. I have the impression this could be a interesting project. But I do not understand what you want to do. Unfortunately this is essential for any help.

So I would appreciate if you would describe what you want to achieve in whole sentences in clear words. It can even be a list.
You see yourself as a visual thinker so you can prepare some sketches explaining what you want (think of it as story board).

This is strongly recommended not just for us. It is recommended for you, that you do not forget what you want. Finally you would need this to explain what your game is all about.

If you are not able to describe what you want, you will never get it. This is the truth of all projects.

Ok this item, is for inter object communication, in a 3d grid.

The cube has a list the list is called “pairs”,

so Face 1 is like a electronic terminal that has a wire to Face 02

So the ray casting, is used to get which face would be touching the face that is “charged” with a property,

in this case, since I do not have the property system working, it uses hostID.

the hostID is the face that was struck, and it uses this to find the pair, and then cast a ray from the opposite end of the pair,

And the game Wrectified, the enemies are essentially a system of 3d logic nodes, with sensors, controllers and actuators,
so shooting a “targeting sensor” with “power down” will not allow it to work for X frames, so the machine is blind,

so Components = actuators and sensors
Component cubes and other shapes - attachment points for cubes and components,

so think lego inventors kit,

So this is my old collision flag system, rather CPU heavy though

this is not, I have it set to 1 fps so I can see what is happening

HAHAH it is working fine, It’s just my normals are off slightly, how do I fix that?

so now about my other thread…I will bump it

Let me analyze this. Let me know if my interpretation is right or not.

This gives me two general information:
A) objects are communicating with each other
B) they are placed in a grid of three dimensions

very good!

This is a a very low level information currently not very helpful. Maybe later.
Question: what is cube?
A list of what? I guess pairs. But what pairs?

Now we have two objects:
Face 1 communicating with Face 02.

Now some wild guesses: You labeled them Face. So they might be part of something else. An object maybe?
So the objects (where the faces belong) communicate to each other?

Ok lower level again. I think this is where you have the problem (I guess that because I read your other threads).
What does it tell me:
You want to cast a ray to detect the other object especially a face of it. (here a sketch would be useful).

Question: with touching you mean that faces are placed near each other? like one lego block is put on another?
How far should they be? Can they be twisted?
I guess from above (3D grid) the objects are (nearly) touching without twists (or 90 degree on the plane they are touching). Again a sketch would be nice.

So this all belongs in how objects identify other objects to communicate with.

What means “charged with a property”? Is that the communication?

hostId is the face? You mean the face that you discovered with ray?
This is confusing.

I guess:
You evaluate a ray from the center of a face (within a mesh) along it’s normal. When you find another object, you look for the face the ray would cross. Then you remember the face you send from and you remember the face you discovered.
This should be possible. The a combination of object and polyProxy should be pretty unique.
I guess this is what you mean with the above list of pairs.

For double check you do the same from the other face.

What if it does not hit the other face? I guess you want to have the faces to be aligned in opposite directions (180°) relative to each other. This can be indeed a method to find the corresponding objects.

This is unfortunately just confusing. I can’t guess what you mean with it. So I ignore it.

??? Does this sentence makes any sense to you?

My summary:
You want two objects to communicate with each other.
The objects identify each other by placing a face to the other object.
When these faces touch (or are near) and facing opposite directions, both objects are connected.

My conclusion:
The idea with the ray from the middle of one face is a good solution. It covers the situation that at least 50% of the face is covered by the other face. It might get problems when the faces have different sizes.

Open questions:
What faces can be used for detecting an communication partner? (Maybe identified by a material?)
What faces of the communication partner can be detected? (all or faces with a specific material only?)


check the .blend it has 90% done

So, right now, if I hit a face with a ray (like face 1) it looks up the material Sensor_01 and then uses that to extract “01”
I turn this into a integer,
then it looks up the pair list,
Id = 1 so pair = “2” in this case,
So 2 is the hostID set to the next cube. so that cube can then send the signal

the file above was accident, I accidently overwrote the .blend with a old version

this is the real one*


CubicComponetTransistorV2 (4).blend (636 KB)

If you want to build components, like building Lego blocks, the easiest way I can think of is to snap to a 3D grid while moving blocks in 3D space (by rounding the worldPosition of the blocks).

The idea is legos with embeded communications from any side to any other :slight_smile:

So 6 sided cube, can connect 6 devices, and send data from any side, to any other :slight_smile:
or to another cube, and onto others,

I do want to have “snap” later
check this out

Tap W after they link :slight_smile:

this will eventually hold them, and release them


Parenting.blend (629 KB)