You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
-improved physics ccd
-html5 exporter works again -disable repeat on image loader by default -can change shape offset en tileset, texture offset was broken
This commit is contained in:
@@ -55,8 +55,10 @@ private:
|
||||
BroadPhase2DSW::ID bpid;
|
||||
Rect2 aabb_cache; //for rayqueries
|
||||
Shape2DSW *shape;
|
||||
Vector2 kinematic_advance;
|
||||
float kinematic_retreat;
|
||||
bool trigger;
|
||||
Shape() { trigger=false; }
|
||||
Shape() { trigger=false; kinematic_retreat=0; }
|
||||
};
|
||||
|
||||
Vector<Shape> shapes;
|
||||
@@ -73,7 +75,7 @@ protected:
|
||||
void _update_shapes_with_motion(const Vector2& p_motion);
|
||||
void _unregister_shapes();
|
||||
|
||||
_FORCE_INLINE_ void _set_transform(const Matrix32& p_transform) { transform=p_transform; _update_shapes(); }
|
||||
_FORCE_INLINE_ void _set_transform(const Matrix32& p_transform, bool p_update_shapes=true) { transform=p_transform; if (p_update_shapes) {_update_shapes();} }
|
||||
_FORCE_INLINE_ void _set_inv_transform(const Matrix32& p_transform) { inv_transform=p_transform; }
|
||||
void _set_static(bool p_static);
|
||||
|
||||
@@ -101,6 +103,12 @@ public:
|
||||
_FORCE_INLINE_ const Matrix32& get_shape_inv_transform(int p_index) const { return shapes[p_index].xform_inv; }
|
||||
_FORCE_INLINE_ const Rect2& get_shape_aabb(int p_index) const { return shapes[p_index].aabb_cache; }
|
||||
|
||||
_FORCE_INLINE_ void set_shape_kinematic_advance(int p_index,const Vector2& p_advance) { shapes[p_index].kinematic_advance=p_advance; }
|
||||
_FORCE_INLINE_ Vector2 get_shape_kinematic_advance(int p_index) const { return shapes[p_index].kinematic_advance; }
|
||||
|
||||
_FORCE_INLINE_ void set_shape_kinematic_retreat(int p_index,float p_retreat) { shapes[p_index].kinematic_retreat=p_retreat; }
|
||||
_FORCE_INLINE_ float get_shape_kinematic_retreat(int p_index) const { return shapes[p_index].kinematic_retreat; }
|
||||
|
||||
_FORCE_INLINE_ Matrix32 get_transform() const { return transform; }
|
||||
_FORCE_INLINE_ Matrix32 get_inv_transform() const { return inv_transform; }
|
||||
_FORCE_INLINE_ Space2DSW* get_space() const { return space; }
|
||||
@@ -109,6 +117,7 @@ public:
|
||||
_FORCE_INLINE_ bool is_shape_set_as_trigger(int p_idx) const { return shapes[p_idx].trigger; }
|
||||
|
||||
|
||||
|
||||
void remove_shape(Shape2DSW *p_shape);
|
||||
void remove_shape(int p_index);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user