Search found 65 matches

by RobAtLab
18 Apr 2018, 15:00
Forum: General questions
Topic: Finding the # number on a parent object
Replies: 2
Views: 680

Re: Finding the # number on a parent object

Thanks, I worked something out from these. Seems to be working perfectly.
by RobAtLab
18 Apr 2018, 14:30
Forum: General questions
Topic: Sensing if a light sensor is within a cone of light
Replies: 16
Views: 2512

Re: Sensing if a light sensor is within a cone of light

I've attached a simplified file where one can move the object called "Robot" into and out of the cone cast by the proximity sensor "IR_light_cone". Depending on whether the dummy "Robot_phototransistorOne" is inside the cone or not differing messages should be printed by the object "Robot". However ...
by RobAtLab
18 Apr 2018, 12:20
Forum: General questions
Topic: Sensing if a light sensor is within a cone of light
Replies: 16
Views: 2512

Re: Sensing if a light sensor is within a cone of light

I'm using it in the context you described in post #2 or post #6. I'll make a simplified version of the .ttt file and try to upload it here so you can see the full context and error messages.

Thanks
by RobAtLab
17 Apr 2018, 18:06
Forum: General questions
Topic: Sensing if a light sensor is within a cone of light
Replies: 16
Views: 2512

Re: Sensing if a light sensor is within a cone of light

Ok, thanks for this but I seem to be having trouble with the packing and unpacking of data into tables. I had those troubles earlier with the code in your post #2 however I was able to avoid needing to use tables at that stage, as shown in my post #5. However to work with multiple cones of light as ...
by RobAtLab
17 Apr 2018, 17:34
Forum: General questions
Topic: Finding the # number on a parent object
Replies: 2
Views: 680

Finding the # number on a parent object

Ok, so I've got a child script running on an object fairly low in the hierachy of a model. I want this child script to be able to find out what the name of the highest level parent it has is, that is to say the name rather than the identifying object number. Then I want to find out what the # number...
by RobAtLab
12 Apr 2018, 15:42
Forum: General questions
Topic: Sensing if a light sensor is within a cone of light
Replies: 16
Views: 2512

Re: Sensing if a light sensor is within a cone of light

So if I have multiple proximity cones writing to the same datablock on a dummy object then they won't overwrite? If I wrote a child script for an algorithm to pick which cone or ignore detection when the dummy is detected by mul;tiple cones, what object would the child script need to be associated w...
by RobAtLab
11 Apr 2018, 16:35
Forum: General questions
Topic: Sensing if a light sensor is within a cone of light
Replies: 16
Views: 2512

Re: Sensing if a light sensor is within a cone of light

The solution you most recently proposed, if I had multiple sensor cones operating and the dummy found itself within their overlap what would happen? In the real world with the infrared system actually in use each emitter sends pulsed IR signals in a really brief time period, so a sensor sitting in t...
by RobAtLab
06 Apr 2018, 17:16
Forum: General questions
Topic: Sensing if a light sensor is within a cone of light
Replies: 16
Views: 2512

Re: Sensing if a light sensor is within a cone of light

Thanks, with a tiny bit of code modification this is working great, but if I have multiple proximity sensor cones, each of which is doing this and each of which is deliberately writing a differently named (in your example the sensor names the custom data blocks as 'detected' ) custom data block to t...
by RobAtLab
05 Mar 2018, 15:50
Forum: General questions
Topic: Sensing if a light sensor is within a cone of light
Replies: 16
Views: 2512

Re: Sensing if a light sensor is within a cone of light

Given those "getObjectsInTree" bits wouldn't this code only work if the dummy and the proximity cone are children of the same object, which in my case they definitely won't be? Also, how would the child script of the robot which carried the light sensor go about determining whether each one was seei...
by RobAtLab
03 Mar 2018, 22:11
Forum: General questions
Topic: Sensing if a light sensor is within a cone of light
Replies: 16
Views: 2512

Sensing if a light sensor is within a cone of light

In the real world I have an infrared LED in the base of a conical shield shinging out light into a conical "field of view" of a precise angle, and on another robot I have a number of IR light sensors each of which can detect whether it is illuminated (and hence somewhere within the geometric volume ...