Home LittleBigPlanet 2 - 3 - Vita - Karting LittleBigPlanet 2 [LBP2] Help!
#1
Follower Troubles
Archive: 2 posts
I have just started work on a RTS level and I have already run into a problem. What I have so far is a cursor that emits an invisible piece of hologram with a tag-red-on it ("waypoints"). Also, I have squares of hologram representing "units". Each of these squares has a follower on it set to go towards the same colored tag as is on the invisible hologram "waypoints". So far so good. At this point I realized that I would have to figure out a way to keep the hologram "units" from overlapping on eachother when they reached the waypoint. To do this I put a tag-green-on each unit. I added a follower on each unit set to flee rather than follow. I set their minimum detection radius to just outside of the unit, so as not to detect the tag attatched to the unit, and their maximum detection radius to be slightly more than that. I figured that it would create a donut shaped detection field that other units would be kept out of. My problem is now, whenever I drop a waypoint, the units move sluggishly and sometimes, not at all. I tried removing the yellow tags but that had no effect. I was only when I removed the "flee", followers that the unit's movement whent back to normal. I would greatly appreciate any ideas for how to fix this or, failing that, some other method of keeping two units from overlapping. If anything is unclear, I could post an image of my logic. | 2011-08-13 20:43:00 Author: Scifiguy Posts: 95 |
Instead of having 2 followers active at the same time (which will very often cause the object to 'freeze'. Two followers will cancel each other out (think about an object thinking it needs to be in 2 simultaneous locations, it'll go "balarrghg I'll just stay here".) Instead have a sensor detecting the same tag as the follower, with the same range as the follower, have the sensor feeding into the follower, while having the sensor's output also plugged into a NOT gate that's plugged into the normal follower (red tag). Depending on range, It'll switch between which one it needs to so only 1 is active at any one time. It will also be a good idea to have the 'bumping into units detection' follower 0.1 bigger in range than its sensor, if you ever get into a situation where the followers range is slightly smaller than the range that triggers it, your object will be prone to getting stuck in the little margin between ranges where the follower is on but can't sense a tag and it'll stop dead. hope this helped. You might find the 'staying out of the way of each other' logic could be quite 'bumpy and jiggly', there's not much you can do about that really from using followers, there are ways of getting it look and feel smoother but the current methods are pretty relatively thermo hungry and complicated/long winded for what is essentially an aesthetic fix. | 2011-08-13 22:25:00 Author: Epicurean Dreamer Posts: 224 |
LBPCentral Archive Statistics
Posts: 1077139
Threads: 69970
Members: 9661
Archive-Date: 2019-01-19
Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.