Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set_axis_lock not working on KinematicBody 3D #25798

Closed
MrCrowley2 opened this issue Feb 11, 2019 · 6 comments
Closed

set_axis_lock not working on KinematicBody 3D #25798

MrCrowley2 opened this issue Feb 11, 2019 · 6 comments

Comments

@MrCrowley2
Copy link

Godot version:
3.1 Beta 3

OS/device including version:
Kubuntu 18.04

Issue description:
The Axis lock is not working.
According to the docs I'd assume to call:

set_axis_lock(move_lock_z,true) 
print("lock z " , get_axis_lock(move_lock_z))

The output on the console is : "lock z False"
And the body still moves on z axis by collision.

I tried some variations:

self.set_axis_lock(PhysicsServer.BODY_AXIS_LINEAR_Z, true)
self.set_axis_lock(move_lock_z, true)
move_lock_z = true
PhysicsServer.body_set_axis_lock(self.get_rid(), PhysicsServer.BODY_AXIS_LINEAR_Z, true)

Neither of them results in a locked z axis.
For a 2.5D platformer z-axis lock would be crucial

the whole axis lock panel that was available in 3.06 in the inspector is gone as well in 3.1
Was the feature discarded?

Minimal reproduction project:
AxisLockBug.zip

@QbieShay
Copy link
Contributor

@AndreaCatania

@Favkis
Copy link

Favkis commented Feb 9, 2020

hey whole year passed, fix this bug maybe?

@Calinou
Copy link
Member

Calinou commented Feb 9, 2020

@Favkis Godot is a community-developed project. Bugs are fixed when someone opens a pull request 🙂

@TomWor
Copy link

TomWor commented Jun 8, 2020

That's an odd one. Anyone figure out a proper workaround for now at least?

Edit: This seems to work for me:

self.transform.origin.z = 0

@RichardEllicott
Copy link

RichardEllicott commented Jun 19, 2020

That's an odd one. Anyone figure out a proper workaround for now at least?

Edit: This seems to work for me:

self.transform.origin.z = 0

that is the same hack i have been using, it seems to be okay .... again yes also i am waiting for any sort of official recognition or promise of fixing this bug actually ever since i started with godot at version 3.0 .... it seems a bit of a radical oversight

i'm not sure of what the consequences of the hack may be but so far it does seem to have none

@Calinou Calinou changed the title set_axis_lock not working on KinematicBody 3D in 3.1 set_axis_lock not working on KinematicBody 3D Jun 19, 2020
@Calinou Calinou added this to the 4.0 milestone Jun 19, 2020
@madmiraal
Copy link
Contributor

madmiraal commented Jan 15, 2021

Fixed with #38852.

@pouleyKetchoupp pouleyKetchoupp modified the milestones: 4.0, 3.4 Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants