When entering a loop it's set up in a way that you can't enter the loop unless you pass through some 'entrance way', and this entrance way has a huge trigger box that tells the game sonic is now in a loop, and as a result sonics physics changes to meet the requirements of moving through a loop. watch a video showing the Sonic Mania level editor and you'll see the various triggers). I mean the poorly made is definitely a huge flaw of it, but the cause of the bugs are inherent to the design of Sonic physics in general.īasically in a sonic game there are trigger boxes all over the place that change sonic between his various physics (and this goes for 2d sonic as well. Now you might think this is just unique to a poorly made Sonic2006, but it's not. walking on walls when you shouldn't be able to, or other walls you should be able to run down not working, or gravity swapping on you weirdly. Take for instance Sonic 2006, known for its buginess. but I'm assuming you're referring to one of the main series ones.īig thing to consider here is that the way sonics physics usually works is contextual. So for starters there's several different sonic physics types.ġ) classic 2d sonic (which is obviously 2d)Īs well as multiple offshoot gameplay styles, like the 3d blast, 2d mobile, and others. I think the rest of my game will be easy enough, but that (the 360 degree running) is an important element of it. The player doesn't randomly rotate in the air since there is a curved/not-flat angle somewhere below them but they haven't landed yet.When the player looses their speed, they fall to the global "down".If the player leaves the surface (jumps, slips off) they will follow normal gravity and fall down.The player is controlled by a rigidbody.The player, given enough speed, can run a full loop without a pre-scripted event, just physics.If the player is going a higher speed, they can attach to a broader range of angles.So, how would I actually go about scripting this? I'd think it'd be as simple as raycasting to the relative "down" of the player & getting the surface normal, checking the normal values vs your speed, and then rotating the player to line up with the normal if they are the right speed. What I want to do, is Sonic the Hedgehog styled physics, sticking to the surface & angling to it based on speed.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |