You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
384 B
16 lines
384 B
using Godot;
|
|
|
|
namespace Babushka.scripts.CSharp.Common;
|
|
|
|
public partial class CameraController : Camera2D
|
|
{
|
|
[Export] private float _multiplier = 1.0f;
|
|
[Export] private Node2D _followNode;
|
|
|
|
|
|
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
public override void _Process(double delta)
|
|
{
|
|
this.Position = _followNode.Transform.Origin * _multiplier;
|
|
}
|
|
} |