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

Logic genius needed! Special follower logic.

Archive: 13 posts


I have been trying quite unsuccessfully to enable an emitted object to perfectly follow a moving object from the point it was emitted. For example; if I emitted a ball a certain distance from a box that is moving up and down, I need the ball to follow the exact movements of the box while maintaining its relative distance from the box. I can partially achieve this using speed sensors on the box (1 for up/down, 1 for left/right) triggering an advanced mover on the ball. The max speed of the speed sensors and mover have to be set to the same value for it to work at all. For simple up and down movement created by a piston, this system works ok, but there is noticeable lag or delay in the ball movement. If the ball is in front of the box it should appear to be glued to the box while the box moves up and down, however the effect is more like it being attached by a short elastic. This delay must be caused by the speed sensors themselves since even when I remove the tags and tag sensors it is still present. I could live with the minor delay although "logic" tells me there should be a "perfect" way of doing it that I'm just not doing..

The real problem occurs when I add another variable to the movement such as adding a mover to the object supporting the box and piston. This throws the ball slowly off course. And if the box should happen to collide with anything and rotate slightly this sends the ball even further off course. I've tried local space on and off on both the advanced mover and speed sensors and playing with acceleration/deceleration on the mover to no avail. I am hesitant to throw rotation sensors into the mix until I can get the basic up/down following working right first. Maybe it's not possible and I should give up but I thought I'd at least post and see if anyone has any insight. If it makes a difference my "ball" in this example is sticker panel material. Thanks!
2011-10-01 05:49:00

Author:
Death_with_an_H
Posts: 72


so when you emit the ball, is the object you want to follow at a set position or is it moving already and if so, can it be at a different position every time the ball emits? if this is the case then the variables will always make it less than accurate because the logic kicks in 'after' the ball is emitted. what you need to do, i would say, is make sure it's constant 'before' it emits. if the emitter could be placed onto something that would be looking directly at what you want the ball to follow then the logic would be constant when it emits

just read what you wrote again and i don't think this would work. i'm struggling to visualise what you are trying to do.
2011-10-01 07:14:00

Author:
GribbleGrunger
Posts: 3910


If you need help add me.2011-10-01 11:20:00

Author:
venat
Posts: 715


Ok maybe my ball and box example was bad. What I'm actually trying to do is emit a sticker panels with a bullet hole stickers on it in front of a moving wooden target. For now the target simply moves up and down on a piston. I want the bullet hole to appear as though it is actually in the wood or "stuck" to the wood. So it would move perfectly with the target. The closest I can get is following on a slight delay. Ideally I would like the bullet holes to follow any moving object perfectly but I doubt this is possible. To bad followers don't have a "follow relative" setting or something. Oh well.2011-10-01 16:14:00

Author:
Death_with_an_H
Posts: 72


Just glue the sticker panel on your target, and set it to invisible. Once it is "hit" have a sensor turn it on. You don't need followers or emitters from what I can tell.2011-10-01 16:33:00

Author:
CYMBOL
Posts: 1230


yeah, as above just said, turning it on rather than emitting it seems the obvious thing to do. perhaps the target is large and you need the bullet hole to appear at different locations? if that's the case i still think this solution is more intuitive2011-10-01 18:17:00

Author:
GribbleGrunger
Posts: 3910


Basically what I have now is a hologram bullet that emits the bullet hole sticker panel on impact with an object with a certain tag. Keep in mind this effect is for a FPS type game. Like GribbleGrunger said the bullet hole needs to appear at the location it is emitted on impact with the target and stay relative to the target. I really can't see any other way of creating this effect without the use of speed sensors and an advanced mover but it just won't quite work this way. If it were possible to tweak sticker material to "sticky" this would be the easiest solution but I've tried that with no success, unless anyone knows any tricks?.. I can't attach a small solid piece of material either since the bullet hole needs to stick within the object or in front of the object, not to the sides...2011-10-02 04:28:00

Author:
Death_with_an_H
Posts: 72


I've come to the conclusion that speed sensors are absolutely useless for my application and yet so close to being extremely useful. To replicate this experiment in a matter of minutes, make 2 boxes and put a controllinator on one and a microchip on the other. Put an anti-grav on each set to 100% and 60% dampening. Attach the joystick movements to an advanced mover on controllinator. Add 2 speed sensors to the controllinator, one set to up/down, one to left/right and both set to max speed equal to the speed of the advanced mover. Copy the advanced mover to the second box's microchip and wire the outputs of the 2 speed sensors to the appropriate inputs on the second advanced mover. Hop in and you will see that the second box follows your movements exactly when you travel straight up and down or straight right and left. Well almost exactly, other than the second box taking a few milliseconds more to accelerate and come to a stop. But when you move diagonally the second box doesn't respond logically at all. It's all over the place depending on how "diagonal" you are traveling. I've tried playing with the input settings on the advanced movers and tried using 2 separate advanced movers and played with scaling the movement and speed sensor maximums all to different effect, but nothing seems to allow for perfect movement copying using speed sensors. It's just one of those things when you get so close to being able to do something yet so far and end up stuck on it. It doesn't make sense why this wouldn't work but I'll just have to accept it and move on unless some smart sack can enlighten me, lol...2011-10-02 19:39:00

Author:
Death_with_an_H
Posts: 72


nothing seems to allow for perfect movement copying using speed sensors.
One solution to your problem is to use the same input method for both boxes.

On box1 you're using an advanced mover linked directly to a controlinator, and you're trying to transmit to an advanced mover on box2 from box1 using speed sensors.

If you were to introduce the same input layer of speed sensors for box1 as you have box2, and mounted the player controlinator on a block of holo removed from directly interfacing with either box, both boxes would move identically.

It's worth noting that even with gravity tweakers and the like there will be some disparity between both boxes if they have different mass.

If it were me I'd wire the analogue stick(s) from a controlinator to tags, and use those to transmit to tag sensors on box1 and box2 since it'll get around the input lag you describe when using speed sensors. Is there any reason why you haven't chosen to use this approach?
2011-10-02 20:48:00

Author:
Ayneh
Posts: 2454


i ran into this issue back in the beta, and found using one advanced mover for up/down and another for left/right solved the issue. you'll need to set both to 100% acc and one to 90% dec and the other to 0% dec. also i find it's best to use a speed of 100 on all sensors and movers, just so you know it wont cause any issues later


One solution to your problem is to use the same input method for both boxes.

On box1 you're using an advanced mover linked directly to a controlinator, and you're trying to transmit to an advanced mover on box2 from box1 using speed sensors.

If you were to introduce the same input layer of speed sensors for box1 as you have box2, and mounted the player controlinator on a block of holo removed from directly interfacing with either box, both boxes would move identically.

It's worth noting that even with gravity tweakers and the like there will be some disparity between both boxes if they have different mass.

If it were me I'd wire the analogue stick(s) from a controlinator to tags, and use those to transmit to tag sensors on box1 and box2 since it'll get around the input lag you describe when using speed sensors. Is there any reason why you haven't chosen to use this approach?

i'm pretty sure he isnt using the controlinator to control it in his level, he was just using that as an example of how others could recreate the problem
2011-10-02 20:53:00

Author:
evret
Posts: 612


i'm pretty sure he isnt using the controlinator to control it in his level, he was just using that as an example of how others could recreate the problem

Exactly, this is still regarding my bullet hole example which uses no user controlled input. Although I do use Aynehs suggested method for another part of my game which works perfectly which is why I was disappointed that the speed sensor method doesn't work. I will try breaking it up into two advanced movers like you said. I tried this before but not with the acceleration settings you suggested. Thanks!
2011-10-02 22:42:00

Author:
Death_with_an_H
Posts: 72


If you have an input signal scaling your main mover's speed, could you wire that signal to a tag, then use a tag sensor set to signal strength on your bullet hole mover to control its movement?2011-10-03 01:17:00

Author:
tdarb
Posts: 689


If you have an input signal scaling your main mover's speed, could you wire that signal to a tag, then use a tag sensor set to signal strength on your bullet hole mover to control its movement?

I still need something wired to the bullet holes advanced mover up/down and left/right. The movement of the object that the bullet hole must follow could be from a variety of sources (piston, movers etc) The problem still seems to be an inherent lag or inaccuracy in the speed sensor which is amplified when moving diagonally. Evret's suggestion of using two movers on the bullet hole works but there is still a slight visible lag. Oh well I think that is as far as I can take this and I'll use the effect in my game and see what happens. Thanks for the help everyone!
2011-10-03 03:37:00

Author:
Death_with_an_H
Posts: 72


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.