Silisiban Posted June 3, 2019 Share Posted June 3, 2019 Hey guys / gals I have a interesting issue that I just can't seem to figure out for the life of me. What I am trying to accomplish is make the character float off the ground or sky walk if you will. I am able to change the players position without issue and the effect works just as I want it to. However, there is one major issue and that is like some kind of gravity or something that continues to pull the player back down to the ground as you take each step. I have looked at multiple mods that have something similar as well as the dragon fly prefab and the gloomer etc... From what I can tell it has something to do with stategraphs that I am totally unaccustomed to. If someone could point me in the right direction on how I could achieve this I would greatly appreciate it. Here is the basis of what I am trying to do. function SkyWalk(inst) local x,y,z = inst.Transform:GetWorldPosition() inst.Transform:SetPosition(x,10,z) -- Sets the position exactly how I want it to but will start to fall to ground as soon as I start moving. end Link to comment Share on other sites More sharing options...
. . . Posted June 3, 2019 Share Posted June 3, 2019 Maybe you can use a in yourcharacter master_postinit then every second they get set back to the position? inst:DoPeriodicTask(1, SkyWalk) Link to comment Share on other sites More sharing options...
CarlZalph Posted June 3, 2019 Share Posted June 3, 2019 The game treats even 'flying' things as if they're on the ground with their collision capsules. It's hidden by the animation of the thing floating up in the air, but for all intents you can assume the game is a 2D one and everything is just a circle on a plane. The gravity is part of the underlying bullet physics engine that's being used, and as far as I'm aware you can't turn that off. Link to comment Share on other sites More sharing options...
Silisiban Posted June 3, 2019 Author Share Posted June 3, 2019 So the only way to accomplish this would be to make the capsule larger and make a whole new animation? Link to comment Share on other sites More sharing options...
CarlZalph Posted June 6, 2019 Share Posted June 6, 2019 On 6/3/2019 at 5:18 PM, Silisiban said: So the only way to accomplish this would be to make the capsule larger and make a whole new animation? @ToastyStoat found a method to stopping it by setting the physics Y scale to a negative number. Perhaps you can employ it here. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now