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

Path Snapping and Navigation

Archive: 9 posts


In parts of my level, I plan to have a laser-like object move through a path, and the player gets to control which way the object turns by using a direct control seat. Describing the problem is extremely difficult to do without a visual reference, so I have provided one:

34957

(ORIGINAL PROBLEM FIXED: READ NEW POST FOR THE NEW ISSUE)

When the player press left on the analogue stick for example the path will go left. Currently the laser object simply has a mover set to local space, and impact sensors for each direction of rotation. These sensors are hooked up to a selector, which then is connected to gyroscopes. When the object hits an intersection, it hits an activated tag rotates. The problem, however, is that the rotation and path snapping is very inaccurate. usually the object overshoots or undershoots the exact center of the path, and becomes misaligned. I would appreciate it very much if someone could help make this gameplay system functional with as little thermometer use as possible. Thank you very much.

~synchronizerman

EDIT: New problem in the latest post
2011-06-13 20:44:00

Author:
synchronizer
Posts: 287


The diagram's confusing but I think I get what your problem is. For accurate rotation, you can go one of two methods:

Gyroscope: This is the one you're using, right? It should be pretty spot on as long as you have the settings maxed out. You should have 100% accelertion and a decent max speed, assuming there is no friction it should rotate perfectly.

Look at rotator: The second way is to use a look at rotator, then have 4 tags aligned at the 12, 3, 6 and 9 O'clock positions. Use your selector to turn each tag on or off, and have the look at rotator set at 100% acceleration/decelleration and set to look at the tags. The tags should all be the same colour/ name as only one will be active at any given time.
2011-06-14 00:50:00

Author:
Xaif
Posts: 365


I'm sorry but that isn't my problem at all. I am using gyroscopes and tags, but the problem is that when the object hits the tag, it turns too late/early because it's technically only hitting the edge of the tag. That misaligned it. I need another solution hmmm...2011-06-14 01:13:00

Author:
synchronizer
Posts: 287


How fast is it travelling? That's going to be a key issue and I don't know if you'll ever have a system where it will work 100% of the time. By the sounds of it you have a very narrow window of opportunity for the object to stop, change direction and start again. While the stopping and starting can being done instantaneously, the rotation cannot. So unless you stop, rotate, then start again I dunno if it'll work.

That's if I'm understanding it properly this time. =P Is that the problem you have?

Could you make the corner curve? The rotation delay wouldn't be an issue if it wasn't a 90 degree corner.

Another thing you could try is using emitters. Could you cover the intersection in some way perhaps? Then when your object enters if done correctly by the player, the entering object is destroyed and an emitter spits out a new object in the correct direction. That way you DO get instantaneous rotation, and 100% accuracy , but at the cost of bad continuity, so if a cover over the top is possible then it could be effective. Hope something was of help.
2011-06-14 01:48:00

Author:
Xaif
Posts: 365


I think the problem has to do with the fact that the rotation doesn't occur in the exact center of the path. When the edge of the object hits the tag, it starts rotating ahead of time. This is simply because of the fact that the object doesn't make contact with the precise center of the tag. From what i can tell, the best solution involves tag followers instead of movers. The object can follow the tag, STOP, rotate, and then follow the next tag. i think i can afford to pause the object for a little bit.2011-06-14 01:57:00

Author:
synchronizer
Posts: 287


All right, I figured out how to get the path snapping to be absolutely perfect. The problem, however, is figuring out how to make the laser object detect which intersection to follow next. Currently, it just follows the next tag. I've already figured out all of the rotation logic as far as i know, so that's taken care of. Still, i have no idea how to make the logic system for detecting the next destination. the way I see it, there are two possible concepts:

1- Have multiple intersection logic chips at each intersection, and create some sort of immensely complicated system for detecting exactly what path the laser is on, what angle, and so on. This could really eat up the thermometer, and it wouldn't be easy to edit the play field later on. I need to be able to edit it though.

2-Have the logic chip on an invisible hologram move to the different intersections. Although once again, the problem is figuring out how to determine where to go.

I can't see how any of these would work, so I would really appreciate it if someone could help me figure this out. I'm so close to getting this working!


For everyone's convenience, here's the link to my conceptual drawing:

34957
2011-06-18 15:06:00

Author:
synchronizer
Posts: 287


I'm not exactly sure how this works, so perhaps I can join you some time later to see.

My suggestion is to move the turning logic to the laser itself. DCS would then be used to just set which direction the laser follows once it meets another turning point. You could make a different tag for each type of turning point (so T shape, + shape, L shape, etc.., along with which angle they are (so L N/E, or L W/N, etc...). By keeping all the logic on the laser, adjusting the map would be very simple, just moving/placing tags.

Use a selector to set which direction you want to go at the next turn point. Use another selector that detects which angle was used at the turn point (so just pulse the first selector value), and use that to deactivate the signal for whichever direction it was (so if you turn west, it would pulse the 'east' port on the selector, and by inverting it and putting them all through AND gates, along with the direction from the DCS, you could prevent the player from constantly bouncing back and forth between turn points).

Or did it not matter which direction the laser was already going....? If you need it to detect the direction, just pulse it to the corresponding direction (so in example, pulse to west, not east).

I'd need to actually see it in LBP to understand what you're trying to do exactly.
2011-06-18 22:37:00

Author:
SSTAGG1
Posts: 1136


You actually have a pretty good understanding, thanks for taking the time to write that all out. When would it be convenient for you to join my in-game? I feel like your description, combined with what I already have would work very well. Your idea to have different tags for different turns has potential to actually EXPAND my original concept. The problem with logic though, is that once it gets too complex, I truly start to get confused. Hopefully you can join me sometime soon. I have my last final exams on Tuesday and Wednesday.2011-06-19 01:08:00

Author:
synchronizer
Posts: 287


This Thursday is when my last 2 are. Though I've been in/out of the hospital for the past 2 months, so my results may be interesting to say the least...

Send me a message on Thursday or Friday, my memory is abysmal.
2011-06-19 04:37:00

Author:
SSTAGG1
Posts: 1136


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.