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

Another way of Waypointing

Archive: 4 posts


First let me give a shout out to Shadowriver! I loved his waypointing tutorial, and my method is just another way,
not saying it's better! however, it is different so I thought I would show people how I tackled the problem.
(not trying to tread on anyones toes here!)

So, I started thinking 'what if there is a way to make a path for an object, platform or 'ship' to follow using waypoints where each waypoint is identical?', in other words use the SAME tag each time.

Well my time in create has been really limited of late but a couple of nights ago I finally had chance to experiment and this is what I came up with:

http://farm8.staticflickr.com/7038/6774365974_58f80ee959.jpg

Okay so the premise of the above logic is simply that the sensors 'look' for the next waypoint by focusing nearby first then at mid range then at the far range. If a tag is detected at the far range by chip 3, the attached follower will move the ship towards it until it passes into the mid range detection on chip 2, and then finally the near range on chip 1, the circuit automatically cycles from chip 1 to 3 again until a waypoint is within range and the cycle starts again.

Importantly the ranges should be set for near,mid and far detection as shown, or just increase the ranges proportionally if needed, or maybe increase the distance with another chip and tweak as necessary.

Also each sensor/follower has a detection angle of 210 degrees aligned with the rocket rotator. Really this is just how I set them to detect perpendicular waypoints at >(+/-90 degrees) and without detecting waypoints behind the ship (I have another addition to the parent chip which takes care of behavior changes/reverse tracking which I will include in a later edit)

I guess a look at rotator added to chips 1,2 & 3 may be a better way of swinging the ship round but as yet I haven't tried, pretty sure it would be better though!

Anyway, once built simply put the right coloured tag on some hollow, then clone it at different positions along your desired path, either linear, square,squiggle,circular or whatever you want (make sure the space between each one is just within the far range or less)

Finally position your ship and let it go!

If I get chance tonight I will edit to include some additional logic that makes the ship swing round and follow the waypoints in reverse if no other waypoints are detected ahead.

I don't think this is a complex system but if you try it out but can't get it working then let me know in a reply and I'll help you out, or pop over to my moon and I will show you.

TC all, Cloak'
2012-02-22 20:01:00

Author:
CloaknBlagger
Posts: 78


Ah interesting solution and little buit lighter then my and should create more natural smooth road, it kind of reminds climing the ladder, put foot on one step and forget about it, concentrate on another thru it could spaz out if 2 routs of same tag are near each other2012-02-22 23:40:00

Author:
Shadowriver
Posts: 3991


Ah interesting solution and little buit lighter then my and should create more natural smooth road, it kind of reminds climing the ladder, put foot on one step and forget about it, concentrate on another thru it could spaz out if 2 routs of same tag are near each other

yes you're right, if two routes of the same tag are too close it will indeed 'spaz' out! LOL, I must admit I haven't as yet built in any error correction for such an occurance, I think it's possible to do with some conditional switching to another chip, but will more than likely involve invoking a bias to the left or right (positive or negative). mm?

In the end though I think that as with many systems, it will all depend on it's application and possibly eliminating the need for the error to ever occur in the first place
2012-02-23 01:18:00

Author:
CloaknBlagger
Posts: 78


I had another thought, consider as an upgrade, removing the followers and replacing with both a look at rotator (for change of direction) & an advance mover for forward momentum, might this possibly give more curvature or drift to the travel due to momentum? (I need to test this out). Now I realise that unless the rotation and forward motion are not balanced correctly that there is a possibility of the ship going off course, as long as the ship is pointing directly at each waypoint before it passes, mmm? the more I think about it the more complex it becomes, LOL. In reality and ideally the rotational speed and velocity needs to be proportional to the distance of each waypoint, omg this is getting into the realms of complex mathematics so I guess it may just have to be a case of overcompensating with the rotation to avoid error, I will do some experimentation and see what I come up with!!

** Okay I have tried the upgrade abovea and its an Epic Fail! Its just uncontrollable using my 3 range system, the ship is all over the place! LOL

My original logic works like a charm (see image at top of page), and the ship will move as fast as you like, I am now using my chip to follow a dynamically laid path or breadcrumb trail, this is easy because the path can be made by emitting the same tag at ranged timed intervals!!, the 'track laying' logic checks for adjacent tags within the 'too close' range before the next waypoint is planted.
2012-02-24 16:07:00

Author:
CloaknBlagger
Posts: 78


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.