#1
Rts unit movement is sticky
Archive: 11 posts
On this rts I am working on when two units collide they tend to stick together and push each other around in circles. I have been trying to use signal detectors to put on the breaks when they get close to each other or a flee tag sensor to no avail. I just found the material tweaker has a sticky toggle and it is off. Looking online seems a easy fix for other rts's is have the units pass through eachother when moving. Can I do this with holgrams? Or have them Change to holograms when moving and revert back when stationary? Thanks for the guidence | 2011-07-09 03:03:00 Author: Unknown User ![]() |
Could you make them change layers when moving | 2011-07-09 03:20:00 Author: Zero10100 ![]() Posts: 385 |
That won't work as I am Using the upper layers for aircraft and terrain. Thanks for the response though ![]() On a side note? PLANETSIDE 2!!!!!! Could it involve the units being weightless? Would more antigravity dampening help? | 2011-07-09 03:34:00 Author: Unknown User ![]() |
That won't work as I am Using the upper layers for aircraft and terrain. Thanks for the response though ![]() Don't you still have the back layer? | 2011-07-09 05:34:00 Author: Zero10100 ![]() Posts: 385 |
If you are using a layer dedicated to unit movement, collision of units becomes inevitable and this is always something you should think about in advance. One way is indeed to use holo material and build the units out of decoration, so they can overlap without problems. Another method would be - and this may not fit into a real-time strategy game, but rather a grid turn-based strategy game - to cluster units that are about to take up the same grid square: only one is displayed, all others disappear, and optionally you can put a little number above it, displaying how many units are clustered. Once they go their own ways again, the cluster breaks and individual units are emitted again. You may also like to look into a behavior for a unit that overrides every other pathing it is doing: if in very close proximity of another unit, move away from it. | 2011-07-09 09:29:00 Author: Antikris ![]() Posts: 1340 |
When I first started on this concept I wanted to get I unit pathfinding down. And now that I have that I found when I cloned my unit 10 times it was chaos. Step 2 was to add unit detection in addition to wall detection and avoidance. Well this is where I found the units orbiting each other. I have recreated diffrent unit types to no avail. They push each other in Circles or drag on each other. Here I decided to research rts pathfinding algorithms, found Dijetks (sp?) solution via nodes with increasing values. That way I lay out a grid and have each unit eliminate the grid node they are on AND the node they are about to move to. That way other units can navigate around other units that are stationary and are moving. I put this on hold as I had my next idea Step 3 was to add a proximity sensor. When any unit is to close, reverse for 1 sec. They still stick and drag eachother. Step 4 was a breakthrough. When a unit has a order AND there is no unit in front of the unit ( the first unit in a convoy ) THEN turn on a tag indicating the lead unit is a leader. All units will try to follow the LEADER if there is one in its front arc. They also must have the same order. If the leader is killed, the next unit in line would then turn on it's leader beacon because there is no unit infront of it. This did not work because they did not make a line formation they just bunched up and pushed units around. So my current logic project is to improve the leader concept by making the leader detect the closest unit, and have that unit turn on it's follower tag while still following the tag in the lead, making a true convoy of units. But this means 2 way unit communications.... Over my head now for sure. Still plugging away at it when i have time though. So this is where I need some advise. Where should i dedicate my time based on your experience? So many ways to go. The hologram sticker idea seems easy, perhaps to easy... It might break the gameplay. If anyone is interisted taking a look at my logic or helping me with this project that would be cool. It is a action rts al la herzog zewi. Thanks in advance | 2011-07-09 19:43:00 Author: Unknown User ![]() |
I know exactly what You're talking about, and I know the sollution![]() ![]() | 2011-07-09 21:40:00 Author: Willman4 ![]() Posts: 170 |
I know exactly what You're talking about, and I know the sollution![]() ![]() Sweet, I was hoping to figure it out myself. But it's been 2 weeks now and I just want to make some progress ![]() | 2011-07-11 02:15:00 Author: Unknown User ![]() |
Add me om PSN then. | 2011-07-11 07:36:00 Author: Willman4 ![]() Posts: 170 |
Have you tried reducing the friction of the units' outer shell to zero, or made it out of glass perhaps? That could be quite a simple fix if it worked. | 2011-07-11 13:30:00 Author: Xaif ![]() Posts: 365 |
Have you tried reducing the friction of the units' outer shell to zero, or made it out of glass perhaps? That could be quite a simple fix if it worked. It doesn't work and it looks really awful. | 2011-07-11 14:11:00 Author: Willman4 ![]() Posts: 170 |
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.