Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Help!
#1

Help creating a drone

Archive: 6 posts


Hey guys, been a while since I've been on lbp2 but I've gotten inspired again lately to return to making one of my levels. I'm at a point at the moment where I'm making the enemies (in this case some robotic drones) but I've hit a problem.

Ideally I want the drones to be little ball-like robots that float through the air towards the player and then rotate accordingly in order to fire their weapons (i.e. Emit something like plasma balls). I've got a basic model already but have hit 2 problems:

1. The drones move through the air towards me and stop at a certain distance so it can fire its weapons without being on top of the player. What I need now however is for them to maintain that same distance when I move towards them so they back away, otherwise I can just pass underneath them and they have to follow me backwards which looks awkward.

2. If I make them able to rotate so they can aim at me this affects their movement so they end up trailing along the ground. I assumed the effect of the follower (which I set to not allow up-down movement) would stop this but it hasn't. Is there any way I can allow them to rotate freely without it affecting the direction that they move in?
2011-09-12 15:08:00

Author:
Unknown User


You'll want two different followers, one to follow Sackboy, and one to flee. First set up the follower so it has minimum range at 20, for example, maximum range at 50, and for it to follow Sackboy. Then you want your second follower to have its max range at about 15, min range at 0 and set to flee from Sackboy. As you can imagine when you're too far away the drone will come closer, and when it's too close it will move away. Though there's that little dead zone between 15 and 20 that means it will stay put and not continuously change back and forth.

To make it point in the right direction attach a look at rotator, this means your plasma's gun will always point at Sackboy whether it's in front or behind.

Obviously you'll likely have to adjust the range setting to suit your needs, my figures are just to demonstarte.
2011-09-12 15:53:00

Author:
Xaif
Posts: 365


I had experimented with that before and just tried it again now and for some reason it doesn't work. In theory I'm sure it should but the thing just stops moving all together, I've got the values nicely spaced out so it shouldn't conflict or anything. And yeah I've attached a seperate turret to it for the gun now so it can shoot in any direction without screwing up.2011-09-12 16:49:00

Author:
Unknown User


Maybe the two followers are cancelling each other out, I'm not sure if they do that but it's possible in the same way other movers do (I think). Instead you could try using player sensors to turn the follwers on and off when they should be - an inverted player sensor for the following follower and a normal sensor for the fleeing follower.2011-09-12 18:00:00

Author:
Xaif
Posts: 365


For ground avoidance, I've never found a non-sloppy solution, but what I usually use is holo as a ground sensor. Stick a gyro on a block of holo and loosely bolt it to your drone. Then, at the bottom of the holo glue another piece of holo. Stick an impact sensor set to include touching on the bottom holo piece and hook it to a mover set to move your drone up.

The reason for the two pieces of holo is that the one bolted to your drone will register the drone as touching it since it's bolted and not glued.
2011-09-12 18:06:00

Author:
Sehven
Posts: 2188


Xaif, thanks for the help, took a bit of fiddling but yeah turns out using player sensors was the key, I now have my drone following me at a set distance now, moving both forward and back.

And Sehven, I've tweaked my current drone so that's no longer an issue now, however your advice is going to be VERY helpful for an updated version I'm planning that gives them more freedom when moving so thank you as well.
2011-09-12 18:25:00

Author:
Unknown User


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.