Log in or register to post comments

Colliders

February 19, 2013 - 2:15pm #1

I have an interactive cloth (plane) attached to a cube using 3 box collders. I works fine when it is not attached to the Image Target. When these objects are attached to the Image Target, the plane does not stay attached to the cube. It's as if the colliders don't work anymore when they the Image Target is their parent. 

Colliders

June 21, 2018 - 8:55am #7

my question is

I have two image target in diffrent size

each of them have an object separately. i want to detect collision between these two objects.

but beacuse my two image target are diffrent in size. it cann not recognize the collision

an body have solution for that

Colliders

February 19, 2013 - 3:18pm #6

If you select your ARCamera in the Hierarchy , you 'll see a Web Cam Behaviour in its inspector. This enables you to select a webcam to use for testing your scene. Then you just press the Play Mode button - see: http://www.youtube.com/watch?v=R01m6A-Wli4

When playing your scene, you can highlight elements in the Hierarchy to see how they are changing in the Inspector.

Your script is disabling the colliders, but it looks like it should be re-enabling them as well.

Colliders

February 19, 2013 - 2:58pm #5

 

Here is the relevant script from the default trackable event handler:
 
 // Enable colliders:
        foreach (Collider component in colliderComponents)
        {
            component.enabled = true;
        }
        Debug.Log("Trackable " + mTrackableBehaviour.TrackableName + " found");
    }
    private void OnTrackingLost()
    {
        Renderer[] rendererComponents = GetComponentsInChildren<Renderer>();
        Collider[] colliderComponents = GetComponentsInChildren<Collider>();
        Terrain[] terrainComponents = GetComponentsInChildren<Terrain>();
        
        foreach( Terrain component in terrainComponents )
        {
            component.enabled = false;
        }
        // Disable rendering:
        foreach (Renderer component in rendererComponents)
        {
            component.enabled = false;
        }
        // Disable colliders:
        foreach (Collider component in colliderComponents)
        {
            component.enabled = false;
        }
        Debug.Log("Trackable " + mTrackableBehaviour.TrackableName + " lost");
    }
 
 
I have Unity Pro... can you be more specific with regard to the process. I'm not familiar with the webcam as you describe it. 
 
Many thx
 
 

Colliders

February 19, 2013 - 2:42pm #4

Check your trackable event handler to see whether it's disabling your colliders, some version do. If  you have Unity pro, you can check this on the Inspector using the webcam.

If that's not the issue, can you send me your project?

Colliders

February 19, 2013 - 2:27pm #3

All the objects are in an empty game object, which is parented to the Image Target.

I've attached the plane (with the interactive cloth) to the cube (has its own collider):

a. with box colliders so there is space between plane and cube

b. with the plane directly touching the cube (tried this with both the plane having a mesh collider and without one)

 

Colliders

February 19, 2013 - 2:19pm #2

try parenting these objects to an empty game object and then parenting that w/ the ImageTarget.

How is the plane attached to the cube?

Log in or register to post comments