Copy motion and rotation by the property

I have the object "A " and hurled and object “B” moving from one place to another and I want that when the object “A” collides with the object "B ", get “stuck” and follow the movement and rotation of object "B ", but if not the name of object “B” but the property he has, below is a script that does this by name, how to be the property?

The collision sensor can filter on object with a specific property.

The outcome is:


from here you have multiple options:

A) parent one object to the other
B) copy location and orientation from one object to the other at each frame
C) the same as B but with offsets

B and C are obvious performans eater.

How to:
you can use the S2A
at the “child” apply
collision sensor (No Pulses) —> Module: S2A.hitObjectToObject —> Parent Actuator

for B) and C) you can modify your code with the sensors output as stated above.

I hope it helps

Hi Monster, thanks, but you could make me an example in another. blend, a sphere colliding with a moving cube stay glued to the cube, paste exactly where they collided

PERFECT , Thanks monster , i make a ninja game and my ninja has a ninja rope … Thanks , Thanks Thanks !!!