In the case of 3D, it was not so colorful anymore, the engine was very limited and not usable at all. Version 3 has introduced many improvements including a virtually new rendering engine. Now 3D looks really beautiful.
Project file engine.cfg -> project.godot
The position of nodes
In G2, to get or set an item you had to use the
get_pos () /
set_pos () function, this usually involved creating additional variables such as
pos. G3 solves this problem and now the position is set using the
pos = get_pos() pos.x += 10 set_pos(pos)
Physics support _fixed_process () -> _physics_process ()
set_fixed_process ()if the
_physics_processmethod exists its active. Similarly with other callback functions such as
KinematicBody2D move () -> move_and_slide ()
move()function is no longer available, and
move_and_slide()replaced it. In addition, we have the
move_and_collide()function, which stops the body movement in case of collision.
Counting frames per second OS -> Engine
Types of events
The events no longer have a type field, if we want to check their type, we use the is operator, eg:
if event.type == InputEvent.SCREEN_TOUCH:
if event is InputEventScreenTouch:
Simplified node getting
get_node()function. In Godot 3, we can just use
$. Of course, the
get_node()function is still available.