Skip to content

Instantly share code, notes, and snippets.

@dploeger
Last active April 18, 2018 03:26
Show Gist options
  • Save dploeger/596e7b2917dd16d97ab2a983eb0c2231 to your computer and use it in GitHub Desktop.
Save dploeger/596e7b2917dd16d97ab2a983eb0c2231 to your computer and use it in GitHub Desktop.
Migration Notes Godot 2 => Godot 3
@gururise
Copy link

gururise commented Dec 1, 2017

KinematicBody2D

  • v2: move(Vector2)
  • v3: move_and_slide(Vector2)

✔️

@cbscribe
Copy link

cbscribe commented Dec 2, 2017

Hey - saw you mention this on Discord - a couple of corrections:

engine.cfg was renamed to godot.cfg

Project config is in project.godot now

$'/root/baz/buzz'

You don't need quotes around the $ reference path anymore, unless a node name contains a space

✔️

@mhilbrunner
Copy link

mhilbrunner commented Dec 12, 2017

RawArray is now PoolByteArray it seems

✔️

@mhilbrunner
Copy link

mhilbrunner commented Dec 13, 2017

Check: atan2(0,-1) now correctly outputs 180, but was 0 in Godot 2 (?)

I'm considering this to be merely a bug, so I'm not adding it here,
✔️

@mhilbrunner
Copy link

mhilbrunner commented Dec 13, 2017

Moar notes (6+ months old, but anyway): https://hastebin.com/soxarekito.pl

Thanks, I've updated some things but don't know, how up to date many of the notes are now.

✔️

@RiverMesa
Copy link

RiverMesa commented Dec 13, 2017

Might want to mention that direct property access/modification is a thing now, as opposed to using setters & getters (unless there's no corresponding property for them, of course).

✔️

@mrcdk
Copy link

mrcdk commented Dec 13, 2017

Another new thing: you can modify the properties of core classes independently for example when using a tween or as an animation track. For example, if you want to tween only the x position of a sprite you can do:
$Tween.interpolate_property(self, "position:x", position.x, position.x + 100, 2, Tween.TRANS_LINEAR, Tween.EASE_IN)

More info here godotengine/godot#12284

✔️

@dploeger
Copy link
Author

dploeger commented Jan 3, 2018

Thanks, everybody. I've updated the gist.

@Nutriz
Copy link

Nutriz commented Jan 6, 2018

According to godotengine/godot#15374 (comment)

create or create_from_data() must be called after Image.new()

2.1 :

var img = Image.new()
img.lock()
img.set_pixel(x, y, color) # Works
img.unlock()

3.0

var img = Image.new()
img.create(1, 1, false, Image.FORMAT_RGBA8)
img.lock()
img.set_pixel(x, y, color) # Works
img.unlock()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment