making my near sensor work

Because i am using armatures having trouble making this quick near test work. On another blend it did work What am i missing? As the cube gets close i want to crab to trigger the action but nothing happens

digiman

Attachments

near-3.blend (250 KB)

A near sensor calculates the distance between two centers of the objects.
So just increase the distance of the near sensor or use collision. But I don’t know for sure if that works with armatures.

*edit
Also, if you want to make him grab the cube on near, try:

  1. when a boolean = true… cube moves
  2. when near, boolean changes to false, so he wont move
  3. parent.

Just an idea. :wink:

I thought the collision idea was good but can’t get it to work i think i need the near sensor I made a few changes still no luck. maybe someone else will fix the blend

digiman

What about this

Attachments

near-3_fixed.blend (254 KB)

Is not completely true. It triggers when a mesh is near the center of the sensor’s owner.
That means if you have two objects with near sensor but different mesh sizes, they might triggered at different distance.

Gamemaster, i think you misunderstood what i needed I wanted it so when the cube armature gets close to the crab it would trigger the bite action (the crabs arms go up and try to bite the cube) your cube just hits the crab and stops the bite action is not triggered When i get that i would make it so the object(cube) would move away fast from the crab this could be made easy if near sensor would work for armatures but they don’t

digiman

A message?

Attachments

near-3_fixed1.2.blend (251 KB)

that’s what i needed Just one more question if you have the time i wanted to know how to make the cube react by turning away In the meantime i will fool with your blend trying to make it turn , thought it was interesting that you added a message sensor ( never used that before ) thanks

digiman

I dont really understand what you mean with the last thing

Just that the cube object is moving toward the crab which makes the crab react but the cube should react as well by turning away So how would i set that up? By the way check out this near blend I think your way is better though

digiman

Attachments

near-2.blend (144 KB)