Home LittleBigPlanet 2 - 3 - Vita - Karting LittleBigPlanet 2 [LBP2] Help!
#1
Forcing the player to move in a certain direction.
Archive: 3 posts
Hello, everyone. So, for the top-down game I'm making, I want players to be able to alter gravity, which would make them faster and floatier. However, I also want to make it so that when they do so, they can only move in the direction they were traveling prior to the change. The first part was easy to do, but I'm having trouble with the second. I tried using a basic mover, but that just forced me to move in the same direction every time. I tried setting the local space option to yes, but that just caused the mover to spin in circles. I also want to set it so you can change the direction you're facing while the anti-gravity is on, and so that if you weren't moving before activating the anti-gravity, you would stay in place until you begin moving in any direction. | 2011-05-22 19:37:00 Author: Unknown User |
You just need to change between the two gravity states using a two-port selector or a NOT gate or something like that. Your movers/rotators need to have 0% deceleration/dampening or they'll influence how the character behaves in both states. http://i92.photobucket.com/albums/l37/Corporeal/b53ff959.jpg I used the settings 0% gravity/100% dampening and 0% gravity/0% dampening for the gravity tweakers. Pretty fun. | 2011-05-22 20:55:00 Author: Ayneh Posts: 2454 |
If you are using a similar setup to Ayneh's for the character's free movement (an advanced mover), you can disable the direction the player moves his controls in by using a directional splitter, evaluate each splitted signal to whether allow it and combine them again before sending it to the advanced mover. This will however limit the controls of the player, and may not be what you are looking for; if the character is moving at a +45 degree up, partly limiting controls is not going to help unless you decide disable all control (you can do that by evaluating all unsplitted signals before they enter the advanced mover; they either all go in or none does). Once you have disabled all regular controls on a certain event, you can allow for other movement controls to take over for the duration of the event; like suddenly pulling the stick down no longer makes your character walk south, but instead decreases the boost speed your character is having. A simple mover set to local space is still the way to go to give your char a sudden boost of speed in its current direction. The grav tweaker may grant the character less resistance in its environment but will not make it move; the movement it may already have will decay less than during ordinary gravity settings. | 2011-05-23 12:15:00 Author: Antikris Posts: 1340 |
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.