how do i make an object randomly pick a direction to move using a mover then with each impact causes it to randomly pick again....
e.g object is in the centre theres nothing to collide with so it will randomly pick out of 4 directions being up down left and right only, when it collides with something it will stop and re random a new direction, if it moved right then out of the new random directions to move right isnt a choice because theres a wall in the way so it can only randomly pick up left or down.... and so on
i dont wanna use movable and i cant use a puppet
whats the answer?
-
You could use four movers.
one mover for each of the four directions.
Hook them up to a selector to use the cycle feature, or you could just make them cycle some other way. On impact send a signal to cycle between 1 and 3 times.
There actually might be a much simpler way to do this using the randomizer. I'm not sure but I think I might have seen an option to randomize without repeating the current output. -
i tried with randomizers and they do have a no repeat option but it gets complicated because when the object hits a wall then the randomizer needs to have 3 out puts not 4 then when it gets into a corner it needs 2 outputs instead its mainly base on how it senses the walls around the object and how it modifys the randomizers outputs
-
You could take the signals off the randomizer, and pass them through exclusive gates. If you have 4 movers, make it so each output connects to through 4 Egates, each connected to one of the movers. You can set priorities on the gates so the signal will pas through to the intended mover first, if it's available, and then to an adjacent one if not.
Then use laser scopes or trigger zones to detect walls, which shut off the gates for the obstructed movement direction. -
I would use a signal generator to generate random values from 0 to 1--one for X and one for Z. Wire them into a combiner in "3 numbers" mode. Wire that fat wire into a signal manipulator, and from there into the mover's direction input.
This will constantly change the direction to a random one.
Now, wire the collision detection into a NOT gate, and from there into the sig-manip's freeze. So while colliding with something it will pick a random direction to move in every frame. While not colliding with something it will stick with the same direction.
Now, to get it to pick a random direction at the start, you'll probably want to have the NOT gate off for a frame, to allow the randomisation happen. So add a switch that's on, through a sig-manip in custom remapper mode, invert the output graph (there's a button for that), turn it onto the "pulse at on" edge mode. This will pulse at on, but send out a 0 for the pulse and a 1 from then on. So the NOT gate will be off for 1 frame and then on from then on.
Hope some of that made sense XD -
ill have a look into all that thanks, is there any way to make a laser sensor to detect walls without the laser turning when the object turns?
-
Turn off "local space" on the laser scope, and it won't rotate with the gadget.
-
'@TAPgiles tried that and it causes other issues, when i use local space i can move the laser to change the direction its aiming at, if i turn local space off i cant move the laser and its always pointing upwards.
i think how the laser aims when local space is off its location and direction is base on the microchip. -
You might have to attach a hidden sculpt via rotator, and then put the scopes on that sculpt along with a gyro to keep it's orientation locked in scene.
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.