collison avoidance

I have been having some problems with collision avoidance I don’t have a blend but i will tell you what i do. i am not using rigid or dynamic i will select actor I then use the near sensor with a motion actuator that turns my object, but the object just goes through the other objects and even through each other. does it sound like i am doing everything correctly?


Your description is too vague.

Post a simple .blend that illustrates the problem.

Here is a quick blend, I am using static because i used it in one of my blends. Actor is selected so it should work. Not only does the rectangle go through the wall it should if it senses the wall spin but nothing happens



collision avoid.blend (128 KB)

Your actual physics bounds are wrong; if you enable “Show Physics Visualization” in the “Game” menu, you would see that the bounds were way too small for the relevant objects in the scene.

To resolve this, you select the object, press CTRL+A, and choose “Scale and Rotation to ObData”.

Also, if you plan on using static objects, you must remember: only objects set to “sensor” can detect collisions. So, if the object doing the detecting is not using the physics engine, it has to be set to sensor.

In addition, the near sensor only responds to distance from one object center, to another object center, so I wouldn’t recommend using that to avoid a wall; a collision sensor is a simple solution, but I think a ray sensor would give you more direct control over everything.

Anyway, a working example of your demo is attached. I hope it helps.


collision_avoid_fix.blend (131 KB)

I see what you did but when i set the wall to sensor as you suggest the physics box was no longer seen and the cube went through the wall, The reason i don’t always use rigid bodies is that rigid is hard to predict, sometimes the objects go crazy spinning or fly off the screen even if i lock the xyz loc and rot i will keep fooling with your blend so i can get it right when when i need it. I am also trying to avoid other moving objects will your blend work for that as well? Also can you set Scale and Rotation to Ob Data to an armature?