forked from godotengine/godot
-
Notifications
You must be signed in to change notification settings - Fork 0
class_node2d
Lukas Sägesser edited this page Jun 22, 2015
·
13 revisions
####Inherits: CanvasItem ####Category: Core
Base node for 2D system.
- void set_pos ( Vector2 pos )
- void set_rot ( float rot )
- void set_scale ( Vector2 scale )
- Vector2 get_pos ( ) const
- float get_rot ( ) const
- Vector2 get_scale ( ) const
- void rotate ( float radians )
- void move_local_x ( float delta, bool scaled=false )
- void move_local_y ( float delta, bool scaled=false )
- void translate ( Vector2 offset )
- void global_translate ( Vector2 offset )
- void scale ( Vector2 ratio )
- void set_global_pos ( Vector2 pos )
- Vector2 get_global_pos ( ) const
- void set_transform ( Matrix32 xform )
- void set_global_transform ( Matrix32 xform )
- void look_at ( Vector2 point )
- float get_angle_to ( Vector2 point ) const
- void set_z ( int z )
- int get_z ( ) const
- void set_z_as_relative ( bool enable )
- bool is_z_relative ( ) const
- void edit_set_pivot ( Vector2 arg0 )
- Matrix32 get_relative_transform ( Object arg0 ) const
Base node for 2D system. Node2D contains a position, rotation and scale, which is used to position and animate. It can alternatively be used with a custom 2D transform (Matrix32). A tree of Node2Ds allows complex hierachies for animation and positioning.
- void set_pos ( Vector2 pos )
Set the position of the 2d node.
- void set_rot ( float rot )
Set the rotation of the 2d node.
- void set_scale ( Vector2 scale )
Set the scale of the 2d node.
- Vector2 get_pos ( ) const
Return the position of the 2D node.
- float get_rot ( ) const
Return the rotation of the 2D node.
- Vector2 get_scale ( ) const
Return the scale of the 2D node.
- Vector2 get_global_pos ( ) const
Return the global position of the 2D node.