Skip to content

Commit

Permalink
expose mesh_scale for fluid renderr
Browse files Browse the repository at this point in the history
  • Loading branch information
Ughuuu committed Sep 24, 2024
1 parent dc2d97e commit a6d035f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin2d/addons/godot-rapier2d/fluid_2d_renderer.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ extends MultiMeshInstance2D

@export var fluid: Fluid2D
@export var color: Color = Color(0.8, 0.8, 0.8, 0.3)

@export var mesh_scale: Vector2 = Vector2(5,5)

func _ready():
if multimesh == null:
Expand All @@ -23,7 +23,7 @@ func _process(_delta):
var points = fluid.points
for i in points.size():
var point = points[i]
var new_transform: Transform2D = Transform2D(0, Vector2(5, 5), 0, point)
var new_transform: Transform2D = Transform2D(0, mesh_scale, 0, point)
multimesh.set_instance_transform_2d(index, new_transform)
multimesh.set_instance_color(index, color)
index += 1

0 comments on commit a6d035f

Please sign in to comment.