Jump to content

Trying to change players y position


Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...