Home LittleBigPlanet 2 - 3 - Vita - Karting LittleBigPlanet 2 [LBP2] Help!
#1
Precision starting and stopping using Holographic material
Archive: 15 posts
http://i132.photobucket.com/albums/q38/nightshade94123/LBPHelp1-01.png Greetings denizens of LBPC!: I come to you, as a humble creator (who also suffers from a paralyzing fear of things not being aligned properly), that needs desperate help with a creation. In the environment of LBP2, there are many ways to make the lightweight and physics free Holographic material move. At the moment I have a 6x6 (Smallest possible grid units) square with a micro chip dead center. In that micro chip is a tag sensor that is attached to a 100% dampening anti gravity tag. The idea is that when the square gets to the center of another square (with the corresponding tag in the middle) it should stop, perfectly, on the dime. However, there are two problems that arise. At any speed <6, the moving square will sense the static square just a pinch or so before fully aligned, causing it to be of by .5 of a unit. At speeds >6, the square blazes right through without even stopping. (Psst Mm, Speed shouldn't factor into a binary switch.) I assure you all, this doesn't need to be aligned just to fulfill my meticulous nature. However, this problem is the root of a great deal of other technical problems. Explaining them wouldn't really help to fix this. SO! Minds on and pens out! Jot down potential solutions, then type up those solutions, and fire them away! My weekend depends on you. | 2011-11-12 00:49:00 Author: Nightshade_games Posts: 76 |
Lol, what an amusing post. Could you not set up something simple with a follower and tag, namely a follower set to follow a (for example) blue tag? The follower would be set to 100% acceleration and a good amount of speed in the middle of one square, and a corresponding tag in the middle of the other? That to me would seem the simplest way... | 2011-11-12 00:57:00 Author: RainbowtipsFort Posts: 144 |
I would put a tag dead center on the /target hologram and then put on the other hologram a tag sensor set to inverted and 0.1. that should get it very close to centered. | 2011-11-12 01:01:00 Author: StaticLinuxpro Posts: 482 |
I would put a tag dead center on the /target hologram and then put on the other hologram a tag sensor set to inverted and 0.1. that should get it very close to centered. This was my thinking as well. However the square's thinking was "WHOO SCREW LOGIC! IMMA KEEP ON FLYING!" | 2011-11-12 01:06:00 Author: Nightshade_games Posts: 76 |
lol. are you online? send an invite and I might be able to help you | 2011-11-12 01:10:00 Author: StaticLinuxpro Posts: 482 |
At speeds >6, the square blazes right through without even stopping. (Psst Mm, Speed shouldn't factor into a binary switch.) Presumably a signal needs to go high for one frame or more to be registered. You could test this by seeing at which point the square moves more than its own length with a 1 frame pulse to the mover. | 2011-11-12 01:19:00 Author: Ayneh Posts: 2454 |
lol. are you online? send an invite and I might be able to help you Im free whenever tonight, just shoot me a PM. | 2011-11-12 01:48:00 Author: Nightshade_games Posts: 76 |
Presumably a signal needs to go high for one frame or more to be registered. You could test this by seeing at which point the square moves more than its own length with a 1 frame pulse to the mover. That is what i was thinking too. the thing that stands out is the speed of 6. The speed of objects is in grid squares per second. So something moving at a speed of 1 will travel 1 large grid square per second. each simulation frame is 1/30 of a second, so in each frame that same object would travel 1/30 of a grid square. At a speed of 6, it will travel 1/5 of a large grid square per frame. Things don't usually divide out into even numbers for no reason. Without knowing all of your settings, it will be very hard to say what is happening, but I would bet there is some timing issue there. My immediate guess would be that it is somewhere between the detection and sending the signal to stop, so I would start by trying to eliminate as many components there as possible. also, just for testing, try making your squares 4x4 instead of 6x6. It sounds silly but it will make it easier to work out the numbers on anything that is off since you will be working with essentially the same units the game engine uses to calculate speed. Once you get it sorted out there, then go back to 6x6 to see if the new setup works on that as well. EDIT-To answer the question, a square that is 6x6 small units would require a speed setting of 45 in order to move its own width in one pulse. | 2011-11-12 02:05:00 Author: tdarb Posts: 689 |
I used to have a similar problem in building a pacmanish game. I didn't know how to limit the player's movement at the time. So I had tags all around the level and the pacman could only walk on them. Problem : it was too fast, so reaching a dead end made pacman go through walls. I fixed it by using a follower to the closest tag when getting inside a wall. So it enters the wall by a few pixels before bouncing back in place. Not too visible, not too ugly. I would use a follower,, whatever what you're trying to do. | 2011-11-12 04:07:00 Author: Unknown User |
In some tests I've found that gravity tweakers set to 100% dampening are inaccurate, but a mover with 100% deceleration and 0 speed works as you'd expect. | 2011-11-13 18:46:00 Author: Ayneh Posts: 2454 |
At any speed <6, the moving square will sense the static square just a pinch or so before fully aligned, causing it to be of by .5 of a unit. At speeds >6, the square blazes right through without even stopping. (Psst Mm, Speed shouldn't factor into a binary switch.) If you want to move things at a fixed speed with perfect grid alignment, you can't rely on using feedback from a tag sensor to determine when to stop an object, as any feedback will be quantized to the game's framerate (30Hz), which may not necessarily correspond to a point in time when the moving object is perfectly aligned. Similarly, as you discovered, when using high speeds, there may not be a simulation frame where the object is in range of the tag sensor, so it'll never get activated. The simplest way to move an object at a fixed speed with perfect precision is to use an advanced mover with 100% acceleration and deceleration, and set the speed such that when activated for a specific duration, it moves a specific distance. So, if you want it to move precisely one large grid unit in one second, set the speed to '1', and activate the mover for exactly one second. Timers are unreliable, so to get the one second, use a battery on a sequencer. If you don't need the speed to be fixed, you could instead use the distance between the object and its intended destination as an analog input to a mover, such that as it moves closer, it slows down, but you won't get perfect grid alignment this way. Of course, that may not matter, depending on the application. | 2011-11-14 19:18:00 Author: Aya042 Posts: 2870 |
I had to read through all the comments to make sure that no one had already answered this. The answer is dead simple, but it easily illudes any creator, including me. Stack strength! There is nothing else to it. On a mover or follower, strength is expressed in acceleration and deceleration. Make sure you set them to 100%, then duplicate the mover a few times. The more mass your object contains, the more movers might be required. Like in physics, objects that have more mass are harder to accelerate from standstill or decelerate once moving. In my shooter level I have created an infinite scroll with huge panels that weigh tons (in real world equivalents). They used to knock down and break other panels on collision before assuming the variable scrolling speed I want the panels to have; the problem was not only slowing fast moving objects down, but also preventing objects that they collide with from giving way. After months of guesswork, trying alternatives and almost quitting, it was stacking movers that saved me. | 2011-11-14 19:50:00 Author: Antikris Posts: 1340 |
If you want to move things at a fixed speed with perfect grid alignment, you can't rely on using feedback from a tag sensor to determine when to stop an object, as any feedback will be quantized to the game's framerate (30Hz), which may not necessarily correspond to a point in time when the moving object is perfectly aligned. Similarly, as you discovered, when using high speeds, there may not be a simulation frame where the object is in range of the tag sensor, so it'll never get activated. The simplest way to move an object at a fixed speed with perfect precision is to use an advanced mover with 100% acceleration and deceleration, and set the speed such that when activated for a specific duration, it moves a specific distance. So, if you want it to move precisely one large grid unit in one second, set the speed to '1', and activate the mover for exactly one second. Timers are unreliable, so to get the one second, use a battery on a sequencer. If you don't need the speed to be fixed, you could instead use the distance between the object and its intended destination as an analog input to a mover, such that as it moves closer, it slows down, but you won't get perfect grid alignment this way. Of course, that may not matter, depending on the application. This is what I did with my BattleSnake level. Basically, every time the mover receives a pulse, it moves a set amount, equating to 1 large grid square. I can't remember what the exact speed is though. I basically got the idea from ScorpSkulls tutorial on grid movement. | 2011-11-17 09:53:00 Author: Ali_Star Posts: 4085 |
This is what I did with my BattleSnake level. Basically, every time the mover receives a pulse, it moves a set amount, equating to 1 large grid square. I can't remember what the exact speed is though. I basically got the idea from ScorpSkulls tutorial on grid movement. 30 The speed is in large grid squares per second. a speed of 1 travels one square every second. a pulse is 1/30 of a second. 1/30 * 30 = 1 using holo as a material for characters makes it really tough to get exact starts and stops. It is possible you could work around it, if you know the speed. Maybe you can make the holo slightly larger than your animation frame so that it takes into account the required stopping distance. | 2011-11-17 23:30:00 Author: tdarb Posts: 689 |
30 The speed is in large grid squares per second. a speed of 1 travels one square every second. a pulse is 1/30 of a second. 1/30 * 30 = 1 using holo as a material for characters makes it really tough to get exact starts and stops. It is possible you could work around it, if you know the speed. Maybe you can make the holo slightly larger than your animation frame so that it takes into account the required stopping distance. Yeah you're right, and it's 15 for a medium grid, and 7.5 for a small grid. | 2011-11-18 11:31:00 Author: Ali_Star Posts: 4085 |
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.