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

Gravity affecting movers, and sensing "standing on the ground"

Archive: 10 posts


I'm trying to make a non-sackbot player character that still controls in a somewhat conventional (read: platform game protagonist) fashion. So far, I've run into two pretty big problems.

The first (quite minor) problem is that I can use an impact sensor in conjunction with an AND gate to create a "jump" function that's only triggerable when the "character" is touching something, but I can't make it differentiate between "pressed against a wall/ceiling" and "standing on the ground". I've tried using a speed sensor instead of an impact sensor to only allow the function to trigger when the object has no vertical movement speed, but this is only working EXTREMELY sporadically and results in a very unreliable function. Does anyone know a way around this?

The second (more major) problem is that I cannot seem to have an object affected by the level's gravity WHILE under the influence of a mover/advanced mover. I've noticed that advanced movers ignore all gravity while active in any capacity, and that using a series of simple movers linked to direction splitters (e.g. left analogue stick moving on X axis -> direction splitter -> "left" and "right" movers) results in the object ignoring gravity while the movers are active, and suddenly remembering gravity exists when the player ceases input/mover activity stops. This is becoming extremely frustrating. I'm sure there has to be a simple way to keep the object influenced by the level's physics but ALSO add the effects of the mover, but I just can't work it out.

Any help would be greatly appreciated!
2012-02-28 08:14:00

Author:
Unknown User


For the first problem, you could place a piece of holo that overlays the floor, stick a tag on it, and have the impact sensor recognise that tag. I think that should sort your problem. 2012-02-28 09:06:00

Author:
Ali_Star
Posts: 4085


An idea for the first problem as well is the probably widely used solution in which you place tags only on the floor sections.
Ooops. My bad... What Ali said then minus the holo.

And about the vertical speed sensor, have you maked sure you dont check the speed momentarily?
I mean connect a back-forth timer set to 0.1 or more to the speed sensor so you give some time to the speed to stabilize.
In a basket level i am trying to make i noticed many times the bots bounce on the floor. ; )
2012-02-28 09:39:00

Author:
zupaton
Posts: 167


An idea for the first problem as well is the probably widely used solution in which you place tags only on the floor sections.
And about the vertical speed sensor, have you maked sure you dont check the speed momentarily?
I mean connect a back-forth timer set to 0.1 or more to the speed sensor so you give some time to the speed to stabilize.
In a basket level i am trying to make i noticed many times the bots bounces on the floor. ; )

Oi! Cheeky! That's what I said!

You can put the tag directly on the floor material. The only reason I suggested putting it on a piece of holo, was if the floor and the wall was going to be one continuous block of material. Using holo will allow you to differentiate between the 2.
2012-02-28 11:53:00

Author:
Ali_Star
Posts: 4085


I've noticed that advanced movers ignore all gravity while active in any capacity, and that using a series of simple movers linked to direction splitters (e.g. left analogue stick moving on X axis -> direction splitter -> "left" and "right" movers) results in the object ignoring gravity while the movers are active, and suddenly remembering gravity exists when the player ceases input/mover activity stops.
Use another mover with 0 speed when no other movers are active to stop that.


I'm sure there has to be a simple way to keep the object influenced by the level's physics but ALSO add the effects of the mover, but I just can't work it out.
Objects with movers mounted on them will be affected by gravity with lower deceleration settings.

The other option is to just replicate the force of gravity on the object yourself. A mover set to go down with local space disabled is the same thing as level gravity. You can think of simple movers as vectors.
2012-02-28 13:08:00

Author:
Ayneh
Posts: 2454


And about the vertical speed sensor, have you maked sure you dont check the speed momentarily?
I mean connect a back-forth timer set to 0.1 or more to the speed sensor so you give some time to the speed to stabilize.
In a basket level i am trying to make i noticed many times the bots bounce on the floor. ; )

Ah, I never thought of that! Thank you. Now that I think of it, this is probably the reason those sensors have inputs as well as outputs. Does anyone happen to know LBP2's native polling interval for sensors?




You can put the tag directly on the floor material. The only reason I suggested putting it on a piece of holo, was if the floor and the wall was going to be one continuous block of material. Using holo will allow you to differentiate between the 2.

This sounds like an excellent idea (and thank you for it!) but I'm not sure I fully understand how to put it into practice. I tried something like this before, and ran into two problems.

Firstly, I can't seem to make holographic material invisible. I've been using sticker panels with extremely hard to notice sitckers on them as a substitute. (The "dotted line" sticker in particular is practically invisible if you shrink it down small enough.)

Secondly, how do I get the whole piece of material to register as "tagged" and not just the actual spot with the tag on it? I've tried to use a "line" of material with a single tag on it before to create a horizontal line which ALL registers as that tag, but the sensors that came into its range only registered the tag once the actual tag itself passed into their circular detection range.


Use another mover with 0 speed when no other movers are active to stop that.


Objects with movers mounted on them will be affected by gravity with lower deceleration settings.

The other option is to just replicate the force of gravity on the object yourself. A mover set to go down with local space disabled is the same thing as level gravity. You can think of simple movers as vectors.

Wouldn't using a mover with 0 speed just keep the object immune to gravity even while stationary, instead of applying it when none of the other movers were active?

I'll try tweaking the deceleration settings again, but I couldn't get this to have the desired effect last time.

The artificial gravity idea sounds like it'd work - it'd be a little bit cumbersome, but combined with the "floor tags" idea (if I can get it working) I can see how the logic would get hooked up. Thanks for the tip!
2012-02-28 22:15:00

Author:
Unknown User


This sounds like an excellent idea (and thank you for it!) but I'm not sure I fully understand how to put it into practice. I tried something like this before, and ran into two problems.

Firstly, I can't seem to make holographic material invisible. I've been using sticker panels with extremely hard to notice sitckers on them as a substitute. (The "dotted line" sticker in particular is practically invisible if you shrink it down small enough.)

Secondly, how do I get the whole piece of material to register as "tagged" and not just the actual spot with the tag on it? I've tried to use a "line" of material with a single tag on it before to create a horizontal line which ALL registers as that tag, but the sensors that came into its range only registered the tag once the actual tag itself passed into their circular detection range.

The artificial gravity idea sounds like it'd work - it'd be a little bit cumbersome, but combined with the "floor tags" idea (if I can get it working) I can see how the logic would get hooked up. Thanks for the tip!

Use an Impact Sensor that has Requires Tag turned on, and set it to detect the proper tag. That will make the sensor active when impacting an object that has that tag attached. If you need it to detect an impact with holo,then you also need to set Include Touching to yes.
2012-02-28 23:18:00

Author:
SuddenEnigma
Posts: 70


Hologram is invisible when its brightness is at zero % - it stays visible a bit in create mode so you don't lose it.
Sticker pannel has an opacity setting too, so you can make a black wall out of it.
2012-02-28 23:38:00

Author:
Unknown User


For the first problem you can have a piece of hologram (2x4 small grid) follow the sackperson. have a tag on one end of the hologram and a follower on the other. You will have to use a gyroscope to keep it upright. Then have impact sensors on the floors sense the tag on the hologram. This may work and it also probably confused you, but I hope you can see what I mean . This will only work properly if this is a one player level, though.2012-02-29 01:37:00

Author:
Wolffy123
Posts: 406


I don't really like external tags, cuz it makes your object not so versatile when you have to tag every floor and/or every wall. Plus, it's no good when a floor is also a wall elsewhere.

if you have hologram that's always beneath the player's feet, it won't come in contact with a wall when the players hits one(or ceiling). You can use that with impact sensor as your floor sensor. Of course, you'll have to shape and position it properly to account for different angled slopes.

Your first idea to use an advanced mover is a fine solution, actually. The only real problem you have to deal with is deceleration. While acceleration affects only one direction, deceleration affects all directions, which includes the direction of gravity. Therefore, if you set the deceleration to zero, your object will fall normally even when being accelerated. Assuming you want the object to decelerate as soon as you let go of the stick, however, you're going to have to use a workaround

If you aren't using a zero friction tweaker and if you don't mind your object keeping it's horizontal momentum in midair, I'd suggest letting ground friction do the job. However, if you want your object to come to a more abrupt stop, you'll need a separate advanced mover, also with zero deceleration. Its acceleration will act as your horizontal-only brake.
http://oi40.tinypic.com/iddcnl.jpg
Technically, the brake will turn on when the analog stick is close to rest(below 20% signal), you can fix it using a position sequencer and battery, but it's not really necessary as long as your main mover has more acceleration than your brake's acceleration. Also, try not to make the brake's speed too high; I found that if it's the same speed as the main mover, it will act jittery. Note that using an anti gravity with dampening instead won't work because it will affect the vertical motion when it's falling.

I was initially thinking ayneh's solution of imitating gravity with a vertical mover wouldn't work because it wouldn't be the accelerating vector that gravity is, but you can have it accumulate speed with a timer that reset whenever you hit ground. Or more simply, set an acceleration less than 100. You'd have to experiment how much to get about the same timing as level gravity. Set a generally high speed, because if it's too low, it will reach a cap that no falling object is limited by, unless you're talking about terminal velocity cause by air friction, but that's not in this game.
2012-03-02 02:45:00

Author:
Unknown User


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.