Question about logic blocks.


Sorry if this is supposed to be in the support forum I couldn’t decide where to post it.
I’m working on a little game that may be expanded when I learn more but I’m not
thinking of making it really great. I’ll see how well it goes. Now my question i have a little
test maze and a monkeyhead as a character. I got the monkey moving but offcourse it’s
still going through the walls so, I have been messing around with a collision sensor block
but I can’t get it to work and I can’t find a tut about it anywhere. So could someone
explain to me how I can keep the monkey from going throug the walls or link to a tut or

thanks in advance

P.s My mother language isn’t english.:eek:

P.P.s I don’t want to use physics.:smiley:

the easiest way is to make the monkey into a dynamic object, and your maze into a static mesh.

You can do it without physics too, but it is too complicated for me to explane… I need to go back to work soon

Can’t you use a collision logic block or something and then when you for instance are going forward and collide with the wall, your movement along the axes is 0?

yes… but this is very complicated, compared to using a dynamic object.

I’m very stubborn I won’t use physics. So maybe if you knew a tut?

Well I’m off to bed for tonight you can still post your advice here but I won’t be answering it.
good night.

P.s: p00f thanks for posting.

What you’ll need is ‘ray’ sensors. Create 4 of them on your monkey, one for each X and Y axises, and adjust the distance according to your monkey’s size. Make sure the ‘pulse mode’ button is pressed on each one (top left button…three dots at the bottom). Now, when the “forward” (probably +Y axis, check to make sure what your axises are) ray sensor is positive, set a ‘motion’ actuator with exactly the opposite force that your character moves forward with.

So: press forward key -> monkey moves forward -> ray detects wall -> applies a negative force counterbalancing the positive force

Do the same for each direction. If you need me to, I could probably rig up an example. Good luck!


Many thanks Stu that sounds like just what i need.
But my character (monkeyhead for now) only moves forward and backward and i turns aroud it’s z axis so do i still need the rays at the sides?
And could you perhaps make a little example?

thanks in advance