Genebris Posted December 23, 2016 Share Posted December 23, 2016 I'm making platformer and I have two problems with character controller and SetInput. 1: When walking on the ground movement speed changes instantly, but when in midair it changes very slow. I need my character to instantly change direction while in midair. 2: Jumping applies force instead of instantly changing speed. Again, I need this to be instant. There wouldn't be problems if SetVelocity worked on character controller, but it doesn't. I can't use rigid body because it bounces on collisions and there doesn't seem to be a way to disable that. Quote Link to comment Share on other sites More sharing options...
gamecreator Posted December 23, 2016 Share Posted December 23, 2016 The tradeoffs are inevitable and this is why I coded my own in my last tournament entry. Not to say that there aren't solutions to your problems but I don't know any. That said, I thought SetVelocity did work on character controllers. I could have sworn I used it to push back enemies in the past when they were hit. Edit: it was probably AddForce. Quote Link to comment Share on other sites More sharing options...
Josh Posted December 23, 2016 Share Posted December 23, 2016 #1 is a design decision. If you would like this to be changed I can consider it. #2 is diffuicult to judge. How else would this work? What exactly are you describing? Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Genebris Posted December 23, 2016 Author Share Posted December 23, 2016 #1 is a design decision. If you would like this to be changed I can consider it. I understand that it's more realistic, but there should be a way to work around that. Like another maxacceleration parameter. #2 is diffuicult to judge. How else would this work? What exactly are you describing? Have you played Volgarr the Viking? This is what I'm trying to make. In this game you can't control character in the air, but you instantly change speed when using double jump. This includes horizontal and vertical speed. If you are falling down for a few seconds you gain speed, but when you use second jump you instantly get positive vertical speed which wouldn't happen with simple AddForce. Same for horizontal speed. It's like calling SetVelocity(0,10,0) the first frame user presses a button, but then letting physics engine to calculate everything. I have recorded a short clip to show this Basically, I could use SetVelocity for both, but it doesn't work with character controller. Can you make it work with it? The tradeoffs are inevitable and this is why I coded my own in my last tournament entry. Not to say that there aren't solutions to your problems but I don't know any. That said, I thought SetVelocity did work on character controllers. I could have sworn I used it to push back enemies in the past when they were hit. Edit: it was probably AddForce. Pretty sure it was AddForce, SetVelocity isn't working for me right now. Did you use rigid body in your game? What did you do with bouncing? I can't launch your game because it starts with too high resolution for my monitor. Quote Link to comment Share on other sites More sharing options...
Rick Posted December 23, 2016 Share Posted December 23, 2016 You can just use the bounding box and make your own that doesn't use the physics engine. That game most likely doesn't use a real physics engine. If you google sides rolling logic for 2d games it would be the same idea a fairly easy really. 1 Quote Link to comment Share on other sites More sharing options...
gamecreator Posted December 23, 2016 Share Posted December 23, 2016 Did you use rigid body in your game? What did you do with bouncing? For my 2D platformer (Run! Jump! Climb!) I coded my own from scratch. For the other one I used the character controller. I can't launch your game because it starts with too high resolution for my monitor. I was afraid this would happen. The game gets information from your system and takes the last (ideal) value. But I guess it doesn't work for everyone. Quote Link to comment Share on other sites More sharing options...
Genebris Posted December 23, 2016 Author Share Posted December 23, 2016 Honestly, if I wanted to make my own collision system, I wouldn't use Leadwerks. Quote Link to comment Share on other sites More sharing options...
Josh Posted December 24, 2016 Share Posted December 24, 2016 That totally makes sense. I can add a damping parameter to use when the character is in the air, and in your case you would set it to 1.0 for no damping. Presently this is hard-coded at 0.25. 2 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Genebris Posted December 24, 2016 Author Share Posted December 24, 2016 Yes, exactly what I need! Quote Link to comment Share on other sites More sharing options...
Genebris Posted January 4, 2017 Author Share Posted January 4, 2017 Has this been added? I need it for tournament Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.