1
Engines / Re: TestGuy - Unity Fangame Engine
« on: August 03, 2014, 11:00:52 PM »
13lueWolf - are you using ingame unity 2D physics for the guy or did you take the route that GM does and have the object create its own gravity (ie you calculate your own gravity every fixed update)? Fiddling around with the GM values that are standard (yuuutuu) and converting them to unity values offers weird results (maybe I have some drag or other things activated that are messing with the physics as well i dunno).
You got me thinking about it and I might go ahead and rework my guy prefab from scratch and get that to be legit.
Overall this is a pretty fun project.
I'm using the Unity built-in gravity, but at a modified value, and modified fixed update. I also limit the vertical falling speed. Not the upwards vertical speed though.
The horizontal movement is a complex expression line to get the directional input to instantly reach the predefined default horizontal speed. This also accounts for changes to the necessary speed addition/subtraction to stay at the desired speed when going up/down slopes or hitting another rigidbody2D. I don't need to limit the speed or worry about it being accelerated too much or too slowly, because the code keeps the character's velocity constant dynamically.
My method is pretty polished and I've tested many other methods and I found this one to work perfectly. But I'm sure you can come up with something good on your own. Keep working on it and make something great.