Home LittleBigPlanet 2 - 3 - Vita - Karting LittleBigPlanet 2 [LBP2] Help!
#1
Advanced (for me at least) sackbot logic questions.
Archive: 6 posts
Hey guys, I just started working on a top down level since my other level wasn't going so well, and I'm in a bit of a slump. The level consists of the player controling a sackbot, who is sitting on a controlinator, which is on an invisible piece of hologram. I've got the movement down, and eventually I stopped the sackbot from going straight through walls thanks to this video http://www.youtube.com/watch?v=2TcyNkqxMAA. (Note: Instead of holograms like in that video, im using actual walls as my limitation). One of my ideas was to have a sackbot press his back against a wall whenever he moves toward it, and be able to move along the wall. Is this possible? If so can someone explain how to do it? To be more specific, when the sackbot touches the wall, he should look the other direction, and you should be able to move left and right along the wall. Another question. I'm going to have sackbots just like mine as enemies, and I wanted to give them a field of vision. How does this work? My idea was to just have a cone shaped hologram thats in front of the enemy at all times that represents their field of vision, but if I did this the enemy could just see me through a wall, since the hologram could just go through a wall (remember this is a top down level.) Does anyone know how I could do this? Sorry if this is hard to understand, let me know if I need to be more clear on something. | 2012-01-07 07:48:00 Author: DreJ1212 Posts: 240 |
For the first question: You'll need a tag on the wall you want to walk against. Put an impact sensor on the hologram (the one the sackbot sits on) and set it to detect the tag you put on the wall. Hook the impact sensor up to a gyroscope (on the hologram) and set the gyroscope to face away from the wall. If you use different tag colors or label them and use several impact sensors and gyroscopes, you could set this up to work on any walls you want. As for the enemy field of view, I'd have to play around in create to give you a solid answer. I'm guessing it could be accomplished with the hologram cone like you said, with some tags for walls and the player's sackbot with a system to detect which is more immediately in front of the enemy (signal strength.) | 2012-01-07 09:26:00 Author: Timelord_X Posts: 55 |
..eventually I stopped the sackbot from going straight through walls thanks to this video http://www.youtube.com/watch?v=2TcyNkqxMAA. (Note: Instead of holograms like in that video, im using actual walls as my limitation). Good, because that method (also shown in a tutorial in my signature) is great for a rectangular field of action but does not lend itself to more detailed shapes (or even diagonal walls). One of my ideas was to have a sackbot press his back against a wall whenever he moves toward it, and be able to move along the wall. Is this possible? You won't be able to make the bot in the controlinator seat to appear exactly as Solid Snake hugging walls, but you could use an impact sensor to detect contact with a wall. While that sensor lights up, you activate a chip that deploys either behavior chips to make the bot look in the opposite direction of ones movement (use a splitter), or a single rocket rotator that is turned 180 degrees in order to turn the controlinator itself. If you already have the stuff in place to prevent the bot from going through the wall (I'd probably use a small piece of solid material under the seat that collides with walls) then he will already be able to move along the wall. Another question. I'm going to have sackbots just like mine as enemies, and I wanted to give them a field of vision. How does this work? My idea was to just have a cone shaped hologram thats in front of the enemy at all times that represents their field of vision, but if I did this the enemy could just see me through a wall, since the hologram could just go through a wall (remember this is a top down level.) Does anyone know how I could do this? Theorizing: when player enters the cone, the enemy keeps emitting tiny pieces of solid material (i.e. rubber, which at small sizes becomes invisible) that rush to the player; they'd live very short lives, just long enough to cover the distance of the cone, but if they are able to reach the player, they will alert the enemy that emitted them. If there is any obstacle in the direct trajectory enemy > player, then the emitted molecules will not reach the player. In general I am not a fan of mixing physics with logic, but sometimes some things are just more practical. | 2012-01-07 10:18:00 Author: Antikris Posts: 1340 |
Thanks for the tips guys, I'll have to try these out. Theorizing: when player enters the cone, the enemy keeps emitting tiny pieces of solid material (i.e. rubber, which at small sizes becomes invisible) that rush to the player; they'd live very short lives, just long enough to cover the distance of the cone, but if they are able to reach the player, they will alert the enemy that emitted them. If there is any obstacle in the direct trajectory enemy > player, then the emitted molecules will not reach the player. In general I am not a fan of mixing physics with logic, but sometimes some things are just more practical. What if I did the same thing you've mentioned here, but instead the enemy would keep emitting tiny pieces of hologram? I could just have a microchip on these holograms that sets them to disappear when they hit a tag called "obstacle" or "wall", or they would disappear when they move out of the enemies field of vision. This might take a lot of holograms being emitted, but it could work. Thoughts? Also, I cant for the life of me figure out how to get an object to stay in front of a sackbot relative to his position. Like, how do I get a hologram cone representing the sackbots field of vision to stay in front of him/her? | 2012-01-07 18:13:00 Author: DreJ1212 Posts: 240 |
You place a tag on obstacles, you place a tag on player, you test with tag sensors if the player is closer to the enemy than the obstacle itself AND if the player is impacting (that's a word ?) the holo cone. Though as I'm writing it, it wouldn't work with big walls and curved walls, unless you place a stripe of tags on it, and again, precision would be lost... It only works for smaller obstacles... Hum, perhaps using multiple stripes of holo to make the cone ? So you can test if there is a wall closer to the enemy than the player! That would work, just make sure the stripes are thinner than the walls. (though if the "cone" is really a circle segment, well it might not work with too thin walls, it would work better with a triangular detection range) | 2012-01-07 18:41:00 Author: Unknown User |
Thanks a lot for the help guys. Making a lot more progress now. I've got the wall hugging concept (including cameras) working pretty well. I'm gonna play around with some "field of vision" options to see what I can do. I'm gonna be testing a lot of the ideas in this thread. I'll keep everyone posted on any progress with that. Any more suggestions are more than welcome. | 2012-01-07 21:56:00 Author: DreJ1212 Posts: 240 |
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.