Skip to content
TheChatArchiveThe Chat Archive
gpt-4-1106-preview· OpenAIAi2 WildChat-4.8M (AI2)

help me implement so my character walks in a 45 degree x angle upwards and -45…

  1. User

    help me implement so my character walks in a 45 degree x angle upwards and -45 downwards:

    this is my player script, how do I change it:

    using Godot; using System;

    public partial class Player : CharacterBody3D { public const uint MaxLifepoints = 200;

    [Export] public float Speed { get; private set; } = 5.0f;

    [Export] public float JumpVelocity { get; private set; } = 4.5f;

    [Export] private uint _lifepoints = MaxLifepoints;

    // Get the gravity from the project settings to be synced with RigidBody nodes. public float gravity = ProjectSettings.GetSetting(“physics/3d/default_gravity”).AsSingle();

    private GameManager _gameManager; private Timer _attackTimer; private Node3D _visual; private ProgressBar _playerLifebar; private AnimationTree _animationTree;

    public override void _Ready() { base._Ready();

    _gameManager = GetNode(“/root/GameManager”); _gameManager.Player = this; _playerLifebar = GetTree().CurrentScene.GetNode(“HUD/PlayerLifeBar”); _playerLifebar.MaxValue = MaxLifepoints; _playerLifebar.Value = _lifepoints;

    _attackTimer = GetNode(“AttackCooldown”); _visual = GetNode(“Visual”); _animationTree = GetNode(“AnimationTree”); }

    public override void _Process(double delta) { base._Process(delta);

    _playerLifebar.Value = _lifepoints; }

    public override void _PhysicsProcess(double delta) { Vector3 velocity = Velocity;

    // Add the gravity. if (!IsOnFloor()) velocity.Y -= gravity * (float)delta;

    // Handle Jump. //if (Input.IsActionJustPressed(“ui_accept”) && IsOnFloor()) // velocity.Y = JumpVelocity;

    // Get the input direction and handle the movement/deceleration. // As good practice, you should replace UI actions with custom gameplay actions. Vector2 inputDir = Input.GetVector(“left”, “right”, “up”, “down”); Vector3 direction = (Transform.Basis * new Vector3(inputDir.X, 0, inputDir.Y)).Normalized(); if (direction != Vector3.Zero) { velocity.X = direction.X * Speed; velocity.Z = direction.Z * Speed; } else { velocity.X = Mathf.MoveToward(Velocity.X, 0, Speed); velocity.Z = Mathf.MoveToward(Velocity.Z, 0, Speed); }

    Velocity = velocity; MoveAndSlide();

    velocity.Y = 0; _animationTree.Set(“parameters/walking/blend_amount”, velocity.LimitLength(1).Length()); if (Mathf.IsZeroApprox(velocity.Length())) return;

    _visual.LookAt(Position + 10 * velocity, Vector3.Up, true); //var angle = 0; //var transform = _visual.Transform; //transform.Basis = new(Vector3.Up, angle); //_visual.Transform = transform; }

    public void OnAttackTimeOut() { _attackTimer.Start();

    var nearestEnemy = _gameManager.GetNearestEnemy(); if (nearestEnemy == null) return;

    //nearestEnemy.TakeDamages(); }

    public void TakeDamages(uint damages) { _lifepoints -= Math.Clamp(damages, 0, _lifepoints); }

    internal void Heal(uint damages) { _lifepoints = Math.Clamp(_lifepoints + damages, 0, MaxLifepoints); } }

  2. Assistant

    To have your character move at specific angles (45 degrees upwards and -45 degrees downwards relative to the horizontal X axis), you'll need to define those angles and implement logic that constrains the player's movement accordingly.

    Since you're using Godot's CharacterBody3D, one way to do this is to modify the inputDir by adding or subtracting an angle to the horizontal (X) component of the movement and normalizing the resulting direction vector.

    I've modified your script below to include a method to calculate the direction based on the input with the desired angles:

    using Godot;
    using System;
    
    public partial class Player : CharacterBody3D
    {
        // Your existing variables here...
    
        // Define the angles to use for upward and downward movement
        private const float UpwardAngleDeg = 45.0f;
        private const float DownwardAngleDeg = -45.0f;
    
        // Your existing _Ready() method here...
    
        // Your existing _Process() method here...
    
        public override void _PhysicsProcess(double delta)
        {
            Vector3 velocity = Velocity;
    
            // Existing gravity and jump code...
    
            // Get the input direction with angles for upward and downward movement
            Vector2 inputDir = GetInputDirectionWithAngles();
    
            Vector3 direction = (Transform.basis * new Vector3(inputDir.x, 0, inputDir.y)).Normalized();
    
            if (direction != Vector3.Zero)
            {
                velocity.x = direction.x * Speed;
                velocity.z = direction.z * Speed;
            }
            else
            {
                velocity.x = Mathf.Lerp(Velocity.x, 0, Speed * (float)delta);
                velocity.z = Mathf.Lerp(Velocity.z, 0, Speed * (float)delta);
            }
    
            Velocity = MoveAndSlide(velocity);
    
            // Other movement code, like animations...
        }
    
        private Vector2 GetInputDirectionWithAngles()
        {
            Vector2 inputDirection = Vector2.Zero;
            
            // Gather the axis inputs
            float horizontal = Input.GetActionStrength("right") - Input.GetActionStrength("left");
            float vertical = Input.GetActionStrength("up") - Input.GetActionStrength("down");
    
            if (vertical > 0) 
            {
                // Moving up
                inputDirection.y += Mathf.Sin(Mathf.Deg2Rad(UpwardAngleDeg)) * vertical;
                inputDirection.x += Mathf.Cos(Mathf.Deg2Rad(UpwardAngleDeg)) * horizontal;
            }
            else if (vertical < 0)
            {
                // Moving down
                inputDirection.y += Mathf.Sin(Mathf.Deg2Rad(DownwardAngleDeg)) * vertical;
                inputDirection.x += Mathf.Cos(Mathf.Deg2Rad(DownwardAngleDeg)) * horizontal;
            }
            else
            {
                // Just walking horizontally or standing still
                inputDirection.x = horizontal;
                inputDirection.y = vertical;
            }
    
            return inputDirection.Normalized();
        }
    
        // Rest of your code...
    }
    

    This code introduces a new method GetInputDirectionWithAngles() which calculates the modified input direction considering your desired angles for upward and downward movement. This method multiplies the horizontal and vertical input values by the cosine and sine of the respective angles, converting those angles from degrees to radians as needed by the trigonometric functions in Godot.

    Please note that I've changed how you handle velocity decay over time (deceleration) to use Mathf.Lerp() instead of Mathf.MoveToward(). Depending on your needs, you might prefer one over the other, so adjust accordingly.

    With this, the player character's horizontal motion should correspond to the given angles for upward and downward movement instead of just along the axis-aligned directions. Adjust the constants UpwardAngleDeg and DownwardAngleDeg if you require different angles for movement.

  3. User

    NuGet Config files used: /home/rickard/.nuget/NuGet/NuGet.Config

         Feeds used:
             https://api.nuget.org/v3/index.json
         All projects are up-to-date for restore.
     1>Done Building Project "/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj" (Restore target(s)).
    

    1:7>Project "/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj" on node 1 (default targets). 1>GenerateTargetFrameworkMonikerAttribute: Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files. CoreGenerateAssemblyInfo: Skipping target "CoreGenerateAssemblyInfo" because all output files are up-to-date with respect to the input files. CoreCompile: /usr/lib/dotnet/dotnet exec "/usr/lib/dotnet/sdk/7.0.113/Roslyn/bincore/csc.dll" /noconfig /unsafe- /checked- /nowarn:1701,1702,IL2121,1701,1702 /fullpaths /nostdlib+ /errorreport:prompt /warn:6 /define:GODOT;GODOT_LINUXBSD;GODOT_PC;GODOT4;GODOT4_1;GODOT4_1_3;GODOT4_OR_GREATER;GODOT4_0_OR_GREATER;GODOT4_1_OR_GREATER;GODOT4_1_0_OR_GREATER;GODOT4_1_1_OR_GREATER;GODOT4_1_2_OR_GREATER;GODOT4_1_3_OR_GREATER;TRACE;TOOLS;DEBUG;NET;NET6_0;NETCOREAPP;NET5_0_OR_GREATER;NET6_0_OR_GREATER;NETCOREAPP1_0_OR_GREATER;NETCOREAPP1_1_OR_GREATER;NETCOREAPP2_0_OR_GREATER;NETCOREAPP2_1_OR_GREATER;NETCOREAPP2_2_OR_GREATER;NETCOREAPP3_0_OR_GREATER;NETCOREAPP3_1_OR_GREATER /preferreduilang:en /highentropyva+ /reference:/home/rickard/.nuget/packages/godotsharp/4.1.3/lib/net6.0/GodotSharp.dll /reference:/home/rickard/.nuget/packages/godotsharpeditor/4.1.3/lib/net6.0/GodotSharpEditor.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/Microsoft.CSharp.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/Microsoft.VisualBasic.Core.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/Microsoft.VisualBasic.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/Microsoft.Win32.Primitives.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/Microsoft.Win32.Registry.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/mscorlib.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/netstandard.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.AppContext.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Buffers.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Collections.Concurrent.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Collections.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Collections.Immutable.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Collections.NonGeneric.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Collections.Specialized.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.ComponentModel.Annotations.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.ComponentModel.DataAnnotations.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.ComponentModel.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.ComponentModel.EventBasedAsync.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.ComponentModel.Primitives.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.ComponentModel.TypeConverter.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Configuration.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Console.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Core.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Data.Common.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Data.DataSetExtensions.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Data.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Diagnostics.Contracts.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Diagnostics.Debug.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Diagnostics.DiagnosticSource.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Diagnostics.FileVersionInfo.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Diagnostics.Process.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Diagnostics.StackTrace.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Diagnostics.TextWriterTraceListener.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Diagnostics.Tools.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Diagnostics.TraceSource.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Diagnostics.Tracing.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Drawing.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Drawing.Primitives.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Dynamic.Runtime.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Formats.Asn1.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Globalization.Calendars.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Globalization.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Globalization.Extensions.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.Compression.Brotli.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.Compression.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.Compression.FileSystem.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.Compression.ZipFile.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.FileSystem.AccessControl.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.FileSystem.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.FileSystem.DriveInfo.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.FileSystem.Primitives.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.FileSystem.Watcher.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.IsolatedStorage.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.MemoryMappedFiles.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.Pipes.AccessControl.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.Pipes.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.UnmanagedMemoryStream.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Linq.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Linq.Expressions.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Linq.Parallel.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Linq.Queryable.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Memory.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.Http.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.Http.Json.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.HttpListener.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.Mail.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.NameResolution.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.NetworkInformation.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.Ping.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.Primitives.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.Requests.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.Security.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.ServicePoint.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.Sockets.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.WebClient.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.WebHeaderCollection.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.WebProxy.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.WebSockets.Client.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.WebSockets.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Numerics.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Numerics.Vectors.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.ObjectModel.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Reflection.DispatchProxy.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Reflection.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Reflection.Emit.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Reflection.Emit.ILGeneration.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Reflection.Emit.Lightweight.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Reflection.Extensions.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Reflection.Metadata.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Reflection.Primitives.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Reflection.TypeExtensions.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Resources.Reader.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Resources.ResourceManager.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Resources.Writer.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.CompilerServices.Unsafe.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.CompilerServices.VisualC.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.Extensions.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.Handles.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.InteropServices.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.InteropServices.RuntimeInformation.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.Intrinsics.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.Loader.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.Numerics.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.Serialization.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.Serialization.Formatters.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.Serialization.Json.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.Serialization.Primitives.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.Serialization.Xml.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Security.AccessControl.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Security.Claims.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Security.Cryptography.Algorithms.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Security.Cryptography.Cng.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Security.Cryptography.Csp.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Security.Cryptography.Encoding.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Security.Cryptography.OpenSsl.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Security.Cryptography.Primitives.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Security.Cryptography.X509Certificates.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Security.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Security.Principal.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Security.Principal.Windows.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Security.SecureString.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.ServiceModel.Web.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.ServiceProcess.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Text.Encoding.CodePages.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Text.Encoding.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Text.Encoding.Extensions.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Text.Encodings.Web.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Text.Json.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Text.RegularExpressions.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Threading.Channels.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Threading.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Threading.Overlapped.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Threading.Tasks.Dataflow.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Threading.Tasks.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Threading.Tasks.Extensions.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Threading.Tasks.Parallel.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Threading.Thread.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Threading.ThreadPool.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Threading.Timer.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Transactions.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Transactions.Local.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.ValueTuple.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Web.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Web.HttpUtility.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Windows.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Xml.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Xml.Linq.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Xml.ReaderWriter.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Xml.Serialization.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Xml.XDocument.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Xml.XmlDocument.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Xml.XmlSerializer.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Xml.XPath.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Xml.XPath.XDocument.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/WindowsBase.dll /debug+ /debug:portable /filealign:512 /optimize- /out:"/home/rickard/Documents/JpGame/.godot/mono/temp/obj/Debug/Survivors Starter Kit.dll" /refout:"/home/rickard/Documents/JpGame/.godot/mono/temp/obj/Debug/refint/Survivors Starter Kit.dll" /target:library /warnaserror- /utf8output /deterministic+ /langversion:10.0 /analyzerconfig:"/home/rickard/Documents/JpGame/.godot/mono/temp/obj/Debug/Survivors Starter Kit.GeneratedMSBuildEditorConfig.editorconfig" /analyzerconfig:/usr/lib/dotnet/sdk/7.0.113/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_6_default.editorconfig /analyzer:/usr/lib/dotnet/sdk/7.0.113/Sdks/Microsoft.NET.Sdk/targets/../analyzers/Microsoft.CodeAnalysis.CSharp.NetAnalyzers.dll /analyzer:/usr/lib/dotnet/sdk/7.0.113/Sdks/Microsoft.NET.Sdk/targets/../analyzers/Microsoft.CodeAnalysis.NetAnalyzers.dll /analyzer:/home/rickard/.nuget/packages/godot.sourcegenerators/4.1.3/analyzers/dotnet/cs/Godot.SourceGenerators.dll /analyzer:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/analyzers/dotnet/cs/System.Text.Json.SourceGeneration.dll Scripts/Enemies/Enemy.cs Scripts/Enemies/EnemyManager.cs Scripts/Enemies/EnemyPowerup.cs Scripts/Enemies/StatEnemyPowerup.cs Scripts/GameManager.cs Scripts/Players/FloatingSphereAttack.cs Scripts/Players/IUpgradable.cs Scripts/Players/LifestealAttack.cs Scripts/Players/Player.cs Scripts/Players/Powerup.cs Scripts/Players/Shooting.cs Scripts/Players/SpiritWater.cs Scripts/PowerupPaths.cs Scripts/UI/DamageLabelManager.cs Scripts/UI/UpgradeView.cs "/home/rickard/Documents/JpGame/.godot/mono/temp/obj/Debug/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs" "/home/rickard/Documents/JpGame/.godot/mono/temp/obj/Debug/Survivors Starter Kit.AssemblyInfo.cs" /warnaserror+:NU1605 1>/home/rickard/Documents/JpGame/Scripts/Players/Player.cs(97,46): error CS1056: Unexpected character '“' [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] 1>/home/rickard/Documents/JpGame/Scripts/Players/Player.cs(97,52): error CS1056: Unexpected character '”' [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] 1>/home/rickard/Documents/JpGame/Scripts/Players/Player.cs(97,81): error CS1056: Unexpected character '“' [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] 1>/home/rickard/Documents/JpGame/Scripts/Players/Player.cs(97,86): error CS1056: Unexpected character '”' [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] 1>/home/rickard/Documents/JpGame/Scripts/Players/Player.cs(98,44): error CS1056: Unexpected character '“' [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] 1>/home/rickard/Documents/JpGame/Scripts/Players/Player.cs(98,47): error CS1056: Unexpected character '”' [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] 1>/home/rickard/Documents/JpGame/Scripts/Players/Player.cs(98,76): error CS1056: Unexpected character '“' [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] 1>/home/rickard/Documents/JpGame/Scripts/Players/Player.cs(98,81): error CS1056: Unexpected character '”' [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] CompilerServer: server - server processed compilation - 449af3b2-c3f9-4ecd-bbde-303118f07d98 1>Done Building Project "/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj" (default targets) -- FAILED.

    Build FAILED.

       "/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj" (default target) (1:7) ->
       (CoreCompile target) -> 
         /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(97,46): error CS1056: Unexpected character '“' [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
         /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(97,52): error CS1056: Unexpected character '”' [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
         /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(97,81): error CS1056: Unexpected character '“' [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
         /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(97,86): error CS1056: Unexpected character '”' [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
         /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(98,44): error CS1056: Unexpected character '“' [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
         /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(98,47): error CS1056: Unexpected character '”' [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
         /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(98,76): error CS1056: Unexpected character '“' [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
         /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(98,81): error CS1056: Unexpected character '”' [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
    
    0 Warning(s)
    8 Error(s)
    
  4. Assistant

    The error messages in your build output are indicating that there are unexpected characters in your Player.cs file. Specifically, these errors are referring to curly quotation marks “ and ”, which are not valid characters in the C# code outside of string literals. C# expects standard straight double quotes " for string delimiters.

    Here's what you should correct:

    For example, you have a line in your code that may look like this with curly quotes:

    public float gravity = ProjectSettings.GetSetting(“physics/3d/default_gravity”).AsSingle();
    

    The curly quotes “ and ” around physics/3d/default_gravity must be replaced with straight double quotes " like this:

    public float gravity = ProjectSettings.GetSetting("physics/3d/default_gravity").AsSingle();
    

    Apply this correction to all the instances where curly quotation marks are used in your code.

    To resolve these errors, open your Player.cs file in a text editor or IDE and replace all curly quotation marks with straight double quotes.

    Before fixing, look at the lines mentioned in the errors (97, 98, etc.). They will contain the problematic characters “ and ”. They need to be replaced like this:

    // Wrong characters
    private const string SomeString = “This is my string”;
    
    // Corrected characters
    private const string SomeString = "This is my string";
    

    After making these changes, save the file and try building your project again. This should resolve the issues and let your build process complete successfully.

  5. User

    /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(66,34): 'Transform3D' does not contain a definition for 'basis' and no accessible extension method 'basis' accepting a first argument of type 'Transform3D' could be found (are you missing a using directive or an assembly reference?)

  6. Assistant

    In Godot 4.x, the API has been changed and some properties and methods might have been renamed compared to previous versions. Specifically, in Godot 3.x, you would access the Basis property of a Transform using lowercase, as in Transform.basis. However, in Godot 4.x, this property was renamed to Basis with an uppercase "B".

    You will need to update the code in your Player.cs file to use the new property name. Locate the line where you access Transform.Basis and change it from .basis to .Basis. If this code line is in the _PhysicsProcess method, it should look something like this after the correction:

    Vector3 direction = (Transform.Basis * new Vector3(inputDir.x, 0, inputDir.y)).Normalized();
    

    Make sure to review your entire script to find all occurrences where .basis is used and update them accordingly.

    After updating your code, save the file and try building your Godot project again. If there are other errors related to API changes in Godot 4.x, you might need to consult the official Godot 4 documentation to find the correct usage for the new version.

  7. User

    Running: /usr/bin/dotnet build "/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj" -c Debug -v normal -l:GodotTools.BuildLogger.GodotBuildLogger,/home/rickard/Downloads/Godot_v4.1.3-stable_mono_linux_x86_64/GodotSharp/Tools/GodotTools.BuildLogger.dll;/home/rickard/.local/share/godot/mono/build_logs/4fd6f9f488e679d2a3a0bce399662415_Debug -p:GodotTargetPlatform=linuxbsd MSBuild version 17.4.8+6918b863a for .NET Build started 11/12/2023 3:11:16 PM. 1>Project "/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj" on node 1 (Restore target(s)). 1>_GetAllRestoreProjectPathItems: Determining projects to restore... Restore: X.509 certificate chain validation will use the fallback certificate bundle at '/usr/lib/dotnet/sdk/7.0.113/trustedroots/codesignctl.pem'. X.509 certificate chain validation will use the fallback certificate bundle at '/usr/lib/dotnet/sdk/7.0.113/trustedroots/timestampctl.pem'. Assets file has not changed. Skipping assets file writing. Path: /home/rickard/Documents/JpGame/.godot/mono/temp/obj/project.assets.json Restored /home/rickard/Documents/JpGame/Survivors Starter Kit.csproj (in 37 ms).

         NuGet Config files used:
             /home/rickard/.nuget/NuGet/NuGet.Config
         
         Feeds used:
             https://api.nuget.org/v3/index.json
         All projects are up-to-date for restore.
     1>Done Building Project "/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj" (Restore target(s)).
    

    1:7>Project "/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj" on node 1 (default targets). 1>GenerateTargetFrameworkMonikerAttribute: Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files. CoreGenerateAssemblyInfo: Skipping target "CoreGenerateAssemblyInfo" because all output files are up-to-date with respect to the input files. CoreCompile: /usr/lib/dotnet/dotnet exec "/usr/lib/dotnet/sdk/7.0.113/Roslyn/bincore/csc.dll" /noconfig /unsafe- /checked- /nowarn:1701,1702,IL2121,1701,1702 /fullpaths /nostdlib+ /errorreport:prompt /warn:6 /define:GODOT;GODOT_LINUXBSD;GODOT_PC;GODOT4;GODOT4_1;GODOT4_1_3;GODOT4_OR_GREATER;GODOT4_0_OR_GREATER;GODOT4_1_OR_GREATER;GODOT4_1_0_OR_GREATER;GODOT4_1_1_OR_GREATER;GODOT4_1_2_OR_GREATER;GODOT4_1_3_OR_GREATER;TRACE;TOOLS;DEBUG;NET;NET6_0;NETCOREAPP;NET5_0_OR_GREATER;NET6_0_OR_GREATER;NETCOREAPP1_0_OR_GREATER;NETCOREAPP1_1_OR_GREATER;NETCOREAPP2_0_OR_GREATER;NETCOREAPP2_1_OR_GREATER;NETCOREAPP2_2_OR_GREATER;NETCOREAPP3_0_OR_GREATER;NETCOREAPP3_1_OR_GREATER /preferreduilang:en /highentropyva+ /reference:/home/rickard/.nuget/packages/godotsharp/4.1.3/lib/net6.0/GodotSharp.dll /reference:/home/rickard/.nuget/packages/godotsharpeditor/4.1.3/lib/net6.0/GodotSharpEditor.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/Microsoft.CSharp.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/Microsoft.VisualBasic.Core.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/Microsoft.VisualBasic.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/Microsoft.Win32.Primitives.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/Microsoft.Win32.Registry.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/mscorlib.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/netstandard.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.AppContext.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Buffers.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Collections.Concurrent.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Collections.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Collections.Immutable.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Collections.NonGeneric.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Collections.Specialized.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.ComponentModel.Annotations.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.ComponentModel.DataAnnotations.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.ComponentModel.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.ComponentModel.EventBasedAsync.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.ComponentModel.Primitives.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.ComponentModel.TypeConverter.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Configuration.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Console.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Core.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Data.Common.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Data.DataSetExtensions.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Data.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Diagnostics.Contracts.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Diagnostics.Debug.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Diagnostics.DiagnosticSource.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Diagnostics.FileVersionInfo.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Diagnostics.Process.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Diagnostics.StackTrace.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Diagnostics.TextWriterTraceListener.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Diagnostics.Tools.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Diagnostics.TraceSource.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Diagnostics.Tracing.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Drawing.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Drawing.Primitives.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Dynamic.Runtime.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Formats.Asn1.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Globalization.Calendars.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Globalization.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Globalization.Extensions.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.Compression.Brotli.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.Compression.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.Compression.FileSystem.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.Compression.ZipFile.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.FileSystem.AccessControl.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.FileSystem.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.FileSystem.DriveInfo.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.FileSystem.Primitives.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.FileSystem.Watcher.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.IsolatedStorage.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.MemoryMappedFiles.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.Pipes.AccessControl.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.Pipes.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.IO.UnmanagedMemoryStream.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Linq.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Linq.Expressions.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Linq.Parallel.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Linq.Queryable.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Memory.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.Http.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.Http.Json.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.HttpListener.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.Mail.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.NameResolution.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.NetworkInformation.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.Ping.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.Primitives.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.Requests.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.Security.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.ServicePoint.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.Sockets.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.WebClient.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.WebHeaderCollection.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.WebProxy.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.WebSockets.Client.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Net.WebSockets.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Numerics.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Numerics.Vectors.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.ObjectModel.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Reflection.DispatchProxy.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Reflection.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Reflection.Emit.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Reflection.Emit.ILGeneration.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Reflection.Emit.Lightweight.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Reflection.Extensions.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Reflection.Metadata.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Reflection.Primitives.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Reflection.TypeExtensions.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Resources.Reader.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Resources.ResourceManager.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Resources.Writer.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.CompilerServices.Unsafe.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.CompilerServices.VisualC.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.Extensions.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.Handles.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.InteropServices.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.InteropServices.RuntimeInformation.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.Intrinsics.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.Loader.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.Numerics.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.Serialization.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.Serialization.Formatters.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.Serialization.Json.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.Serialization.Primitives.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Runtime.Serialization.Xml.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Security.AccessControl.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Security.Claims.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Security.Cryptography.Algorithms.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Security.Cryptography.Cng.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Security.Cryptography.Csp.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Security.Cryptography.Encoding.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Security.Cryptography.OpenSsl.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Security.Cryptography.Primitives.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Security.Cryptography.X509Certificates.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Security.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Security.Principal.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Security.Principal.Windows.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Security.SecureString.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.ServiceModel.Web.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.ServiceProcess.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Text.Encoding.CodePages.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Text.Encoding.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Text.Encoding.Extensions.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Text.Encodings.Web.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Text.Json.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Text.RegularExpressions.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Threading.Channels.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Threading.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Threading.Overlapped.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Threading.Tasks.Dataflow.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Threading.Tasks.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Threading.Tasks.Extensions.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Threading.Tasks.Parallel.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Threading.Thread.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Threading.ThreadPool.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Threading.Timer.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Transactions.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Transactions.Local.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.ValueTuple.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Web.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Web.HttpUtility.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Windows.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Xml.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Xml.Linq.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Xml.ReaderWriter.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Xml.Serialization.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Xml.XDocument.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Xml.XmlDocument.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Xml.XmlSerializer.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Xml.XPath.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/System.Xml.XPath.XDocument.dll /reference:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/ref/net6.0/WindowsBase.dll /debug+ /debug:portable /filealign:512 /optimize- /out:"/home/rickard/Documents/JpGame/.godot/mono/temp/obj/Debug/Survivors Starter Kit.dll" /refout:"/home/rickard/Documents/JpGame/.godot/mono/temp/obj/Debug/refint/Survivors Starter Kit.dll" /target:library /warnaserror- /utf8output /deterministic+ /langversion:10.0 /analyzerconfig:"/home/rickard/Documents/JpGame/.godot/mono/temp/obj/Debug/Survivors Starter Kit.GeneratedMSBuildEditorConfig.editorconfig" /analyzerconfig:/usr/lib/dotnet/sdk/7.0.113/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_6_default.editorconfig /analyzer:/usr/lib/dotnet/sdk/7.0.113/Sdks/Microsoft.NET.Sdk/targets/../analyzers/Microsoft.CodeAnalysis.CSharp.NetAnalyzers.dll /analyzer:/usr/lib/dotnet/sdk/7.0.113/Sdks/Microsoft.NET.Sdk/targets/../analyzers/Microsoft.CodeAnalysis.NetAnalyzers.dll /analyzer:/home/rickard/.nuget/packages/godot.sourcegenerators/4.1.3/analyzers/dotnet/cs/Godot.SourceGenerators.dll /analyzer:/home/rickard/.dotnet/packs/Microsoft.NETCore.App.Ref/6.0.24/analyzers/dotnet/cs/System.Text.Json.SourceGeneration.dll Scripts/Enemies/Enemy.cs Scripts/Enemies/EnemyManager.cs Scripts/Enemies/EnemyPowerup.cs Scripts/Enemies/StatEnemyPowerup.cs Scripts/GameManager.cs Scripts/Players/FloatingSphereAttack.cs Scripts/Players/IUpgradable.cs Scripts/Players/LifestealAttack.cs Scripts/Players/Player.cs Scripts/Players/Powerup.cs Scripts/Players/Shooting.cs Scripts/Players/SpiritWater.cs Scripts/PowerupPaths.cs Scripts/UI/DamageLabelManager.cs Scripts/UI/UpgradeView.cs "/home/rickard/Documents/JpGame/.godot/mono/temp/obj/Debug/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs" "/home/rickard/Documents/JpGame/.godot/mono/temp/obj/Debug/Survivors Starter Kit.AssemblyInfo.cs" /warnaserror+:NU1605 1>/home/rickard/Documents/JpGame/Scripts/Players/Player.cs(66,63): error CS1061: 'Vector2' does not contain a definition for 'x' and no accessible extension method 'x' accepting a first argument of type 'Vector2' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] 1>/home/rickard/Documents/JpGame/Scripts/Players/Player.cs(66,78): error CS1061: 'Vector2' does not contain a definition for 'y' and no accessible extension method 'y' accepting a first argument of type 'Vector2' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] 1>/home/rickard/Documents/JpGame/Scripts/Players/Player.cs(70,13): error CS1061: 'Vector3' does not contain a definition for 'x' and no accessible extension method 'x' accepting a first argument of type 'Vector3' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] 1>/home/rickard/Documents/JpGame/Scripts/Players/Player.cs(70,27): error CS1061: 'Vector3' does not contain a definition for 'x' and no accessible extension method 'x' accepting a first argument of type 'Vector3' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] 1>/home/rickard/Documents/JpGame/Scripts/Players/Player.cs(71,13): error CS1061: 'Vector3' does not contain a definition for 'z' and no accessible extension method 'z' accepting a first argument of type 'Vector3' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] 1>/home/rickard/Documents/JpGame/Scripts/Players/Player.cs(71,27): error CS1061: 'Vector3' does not contain a definition for 'z' and no accessible extension method 'z' accepting a first argument of type 'Vector3' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] 1>/home/rickard/Documents/JpGame/Scripts/Players/Player.cs(75,13): error CS1061: 'Vector3' does not contain a definition for 'x' and no accessible extension method 'x' accepting a first argument of type 'Vector3' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] 1>/home/rickard/Documents/JpGame/Scripts/Players/Player.cs(75,37): error CS1061: 'Vector3' does not contain a definition for 'x' and no accessible extension method 'x' accepting a first argument of type 'Vector3' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] 1>/home/rickard/Documents/JpGame/Scripts/Players/Player.cs(76,13): error CS1061: 'Vector3' does not contain a definition for 'z' and no accessible extension method 'z' accepting a first argument of type 'Vector3' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] 1>/home/rickard/Documents/JpGame/Scripts/Players/Player.cs(76,37): error CS1061: 'Vector3' does not contain a definition for 'z' and no accessible extension method 'z' accepting a first argument of type 'Vector3' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] 1>/home/rickard/Documents/JpGame/Scripts/Players/Player.cs(79,14): error CS1501: No overload for method 'MoveAndSlide' takes 1 arguments [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] 1>/home/rickard/Documents/JpGame/Scripts/Players/Player.cs(102,19): error CS1061: 'Vector2' does not contain a definition for 'y' and no accessible extension method 'y' accepting a first argument of type 'Vector2' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] 1>/home/rickard/Documents/JpGame/Scripts/Players/Player.cs(102,40): error CS0117: 'Mathf' does not contain a definition for 'Deg2Rad' [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] 1>/home/rickard/Documents/JpGame/Scripts/Players/Player.cs(103,19): error CS1061: 'Vector2' does not contain a definition for 'x' and no accessible extension method 'x' accepting a first argument of type 'Vector2' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] 1>/home/rickard/Documents/JpGame/Scripts/Players/Player.cs(103,40): error CS0117: 'Mathf' does not contain a definition for 'Deg2Rad' [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] 1>/home/rickard/Documents/JpGame/Scripts/Players/Player.cs(108,19): error CS1061: 'Vector2' does not contain a definition for 'y' and no accessible extension method 'y' accepting a first argument of type 'Vector2' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] 1>/home/rickard/Documents/JpGame/Scripts/Players/Player.cs(108,40): error CS0117: 'Mathf' does not contain a definition for 'Deg2Rad' [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] 1>/home/rickard/Documents/JpGame/Scripts/Players/Player.cs(109,19): error CS1061: 'Vector2' does not contain a definition for 'x' and no accessible extension method 'x' accepting a first argument of type 'Vector2' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] 1>/home/rickard/Documents/JpGame/Scripts/Players/Player.cs(109,40): error CS0117: 'Mathf' does not contain a definition for 'Deg2Rad' [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] 1>/home/rickard/Documents/JpGame/Scripts/Players/Player.cs(114,19): error CS1061: 'Vector2' does not contain a definition for 'x' and no accessible extension method 'x' accepting a first argument of type 'Vector2' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] 1>/home/rickard/Documents/JpGame/Scripts/Players/Player.cs(115,19): error CS1061: 'Vector2' does not contain a definition for 'y' and no accessible extension method 'y' accepting a first argument of type 'Vector2' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] 1>/home/rickard/Documents/JpGame/Scripts/UI/UpgradeView.cs(35,7): warning CS0219: The variable 'choiceIndex' is assigned but its value is never used [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj] CompilerServer: server - server processed compilation - 4807381d-6d55-4190-b28d-0b85f6e39905 1>Done Building Project "/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj" (default targets) -- FAILED.

    Build FAILED.

       "/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj" (default target) (1:7) ->
       (CoreCompile target) -> 
         /home/rickard/Documents/JpGame/Scripts/UI/UpgradeView.cs(35,7): warning CS0219: The variable 'choiceIndex' is assigned but its value is never used [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
    
    
       "/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj" (default target) (1:7) ->
       (CoreCompile target) -> 
         /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(66,63): error CS1061: 'Vector2' does not contain a definition for 'x' and no accessible extension method 'x' accepting a first argument of type 'Vector2' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
         /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(66,78): error CS1061: 'Vector2' does not contain a definition for 'y' and no accessible extension method 'y' accepting a first argument of type 'Vector2' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
         /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(70,13): error CS1061: 'Vector3' does not contain a definition for 'x' and no accessible extension method 'x' accepting a first argument of type 'Vector3' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
         /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(70,27): error CS1061: 'Vector3' does not contain a definition for 'x' and no accessible extension method 'x' accepting a first argument of type 'Vector3' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
         /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(71,13): error CS1061: 'Vector3' does not contain a definition for 'z' and no accessible extension method 'z' accepting a first argument of type 'Vector3' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
         /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(71,27): error CS1061: 'Vector3' does not contain a definition for 'z' and no accessible extension method 'z' accepting a first argument of type 'Vector3' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
         /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(75,13): error CS1061: 'Vector3' does not contain a definition for 'x' and no accessible extension method 'x' accepting a first argument of type 'Vector3' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
         /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(75,37): error CS1061: 'Vector3' does not contain a definition for 'x' and no accessible extension method 'x' accepting a first argument of type 'Vector3' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
         /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(76,13): error CS1061: 'Vector3' does not contain a definition for 'z' and no accessible extension method 'z' accepting a first argument of type 'Vector3' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
         /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(76,37): error CS1061: 'Vector3' does not contain a definition for 'z' and no accessible extension method 'z' accepting a first argument of type 'Vector3' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
         /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(79,14): error CS1501: No overload for method 'MoveAndSlide' takes 1 arguments [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
         /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(102,19): error CS1061: 'Vector2' does not contain a definition for 'y' and no accessible extension method 'y' accepting a first argument of type 'Vector2' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
         /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(102,40): error CS0117: 'Mathf' does not contain a definition for 'Deg2Rad' [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
         /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(103,19): error CS1061: 'Vector2' does not contain a definition for 'x' and no accessible extension method 'x' accepting a first argument of type 'Vector2' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
         /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(103,40): error CS0117: 'Mathf' does not contain a definition for 'Deg2Rad' [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
         /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(108,19): error CS1061: 'Vector2' does not contain a definition for 'y' and no accessible extension method 'y' accepting a first argument of type 'Vector2' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
         /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(108,40): error CS0117: 'Mathf' does not contain a definition for 'Deg2Rad' [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
         /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(109,19): error CS1061: 'Vector2' does not contain a definition for 'x' and no accessible extension method 'x' accepting a first argument of type 'Vector2' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
         /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(109,40): error CS0117: 'Mathf' does not contain a definition for 'Deg2Rad' [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
         /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(114,19): error CS1061: 'Vector2' does not contain a definition for 'x' and no accessible extension method 'x' accepting a first argument of type 'Vector2' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
         /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(115,19): error CS1061: 'Vector2' does not contain a definition for 'y' and no accessible extension method 'y' accepting a first argument of type 'Vector2' could be found (are you missing a using directive or an assembly reference?) [/home/rickard/Documents/JpGame/Survivors Starter Kit.csproj]
    
    1 Warning(s)
    21 Error(s)
    

    Time Elapsed 00:00:00.93

  8. Assistant

    The errors you're encountering are typical issues that arise from using properties or methods that do not exist or have been changed in the specific API version you are using. The errors indicate two primary issues:

    1. Accessing members that do not exist in Vector2 and Vector3, such as using .x, .y, and .z which should be capitalized like .X, .Y, and .Z.
    2. Using a function (MoveAndSlide) with an incorrect number of arguments compared to what the API expects.

    To address these issues:

    1. Replace .x, .y, and .z with .X, .Y, and .Z on Vector2 and Vector3 objects.

    Replace this:

    inputDir.x
    inputDir.y
    velocity.x
    velocity.z
    

    With this:

    inputDir.X
    inputDir.Y
    velocity.X
    velocity.Z
    
    1. Check the expected arguments for the MoveAndSlide method in Godot 4 and adjust your call accordingly.

    In Godot 3.x, MoveAndSlide could be called with one argument:

    MoveAndSlide(velocity);
    

    But in Godot 4, MoveAndSlide might require more arguments, so you may need to check the updated API documentation and correct the method call with the appropriate arguments.

    1. Use Mathf.Deg2Rad corrected as Mathf.Deg2Rad() which is likely a static property in Godot 4, instead of a field:

    Replace this:

    Mathf.Deg2Rad
    

    With this:

    Mathf.Deg2Rad()
    

    Here's a modified piece of your code as an example, with the corrections applied:

    Vector3 direction = (Transform.Basis * new Vector3(inputDir.X, 0, inputDir.Y)).Normalized();
    // other properties corrected and method calls adjusted
    

    After making these changes in all the indicated places in your code, save your files, and attempt to build the project again.

    Additionally, it's good practice to ensure that you've properly set up your development environment for Godot 4.x and that you're using the correct version of the API documentation as a reference.

  9. User

    if (vertical > 0) { // Moving up inputDirection.Y += Mathf.Sin(Mathf.Deg2Rad(UpwardAngleDeg)) * vertical; inputDirection.X += Mathf.Cos(Mathf.Deg2Rad(UpwardAngleDeg)) * horizontal; }

    /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(103,40): 'Mathf' does not contain a definition for 'Deg2Rad'

  10. Assistant

    The error you're encountering—indicating that 'Mathf' does not contain a definition for 'Deg2Rad'—suggests that you're trying to use Deg2Rad as if it were a method by trying to call Mathf.Deg2Rad(someAngle), but it's likely that Deg2Rad is a constant rather than a method in the Godot 4.x API.

    In many game engines and math libraries, the degree to radians conversion is provided as a constant which you use to multiply with the degree value to convert it to radians. In Godot 4.x, if Deg2Rad is indeed a constant field or property, you should change your code to use it by multiplication, not as a method invocation.

    Here's how you can correct it:

    Change this:

    Mathf.Sin(Mathf.Deg2Rad(UpwardAngleDeg))
    Mathf.Cos(Mathf.Deg2Rad(UpwardAngleDeg))
    

    To this:

    Mathf.Sin(UpwardAngleDeg * Mathf.Deg2Rad)
    Mathf.Cos(UpwardAngleDeg * Mathf.Deg2Rad)
    

    Here's a revised example of how the code should look with the conversion to radians using multiplication:

    if (vertical > 0) 
    {
        // Moving up
        inputDirection.Y += Mathf.Sin(UpwardAngleDeg * Mathf.Deg2Rad) * vertical;
        inputDirection.X += Mathf.Cos(UpwardAngleDeg * Mathf.Deg2Rad) * horizontal;
    }
    

    Please apply this correction wherever you are using Mathf.Deg2Rad(UpwardAngleDeg) or similar expressions in your code. After making these changes, save the file and try to build your project again.

  11. User

    still /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(103,57): 'Mathf' does not contain a definition for 'Deg2Rad'

  12. Assistant

    It seems the Mathf.Deg2Rad constant is not available in the Godot 4 API. In most programming environments, the conversion from degrees to radians can be achieved by multiplying the degree value by Mathf.PI / 180, as there are π radians in 180 degrees.

    Please replace your usage of Mathf.Deg2Rad with Mathf.Pi / 180.0f for the conversion:

    if (vertical > 0) 
    {
        // Moving up
        inputDirection.Y += Mathf.Sin(UpwardAngleDeg * (Mathf.Pi / 180.0f)) * vertical;
        inputDirection.X += Mathf.Cos(UpwardAngleDeg * (Mathf.Pi / 180.0f)) * horizontal;
    }
    

    Make sure you update all occurrences in your code where you performed degree-to-radian conversions.

    After changing to use Mathf.Pi / 180.0f instead of Mathf.Deg2Rad, try building your project again to see if the errors have been resolved.

  13. User

    it only moving downards right now and not even in a -45 degree:

    using Godot; using System;

    public partial class Player : CharacterBody3D { public const uint MaxLifepoints = 200;

    [Export]
    public float Speed { get; private set; } = 5.0f;
    
    [Export]
    public float JumpVelocity { get; private set; } = 4.5f;
    
    [Export]
    private uint _lifepoints = MaxLifepoints;
    
    // Get the gravity from the project settings to be synced with RigidBody nodes.
    public float gravity = ProjectSettings.GetSetting("physics/3d/default_gravity").AsSingle();
    
    
    private const float UpwardAngleDeg = 45.0f;
    private const float DownwardAngleDeg = -45.0f;
    private GameManager _gameManager;
    private Timer _attackTimer;
    private Node3D _visual;
    private ProgressBar _playerLifebar;
    private AnimationTree _animationTree;
    
    public override void _Ready()
    {
    	base._Ready();
    
    	_gameManager = GetNode<GameManager>("/root/GameManager");
    	_gameManager.Player = this;
    	_playerLifebar = GetTree().CurrentScene.GetNode<ProgressBar>("HUD/PlayerLifeBar");
    	_playerLifebar.MaxValue = MaxLifepoints;
    	_playerLifebar.Value = _lifepoints;
    
    	_attackTimer = GetNode<Timer>("AttackCooldown");
    	_visual = GetNode<Node3D>("Visual");
    	_animationTree = GetNode<AnimationTree>("AnimationTree");
    }
    
    public override void _Process(double delta)
    {
    	base._Process(delta);
    
    	_playerLifebar.Value = _lifepoints;
    }
    
    public override void _PhysicsProcess(double delta)
    {
    	Vector3 velocity = Velocity;
    
    	// Add the gravity.
    	if (!IsOnFloor())
    		velocity.Y -= gravity * (float)delta;
    
    	// Handle Jump.
    	//if (Input.IsActionJustPressed("ui_accept") && IsOnFloor())
    	//    velocity.Y = JumpVelocity;
    
    	// Get the input direction with angles for upward and downward movement
    	Vector2 inputDir = GetInputDirectionWithAngles();
    
    	Vector3 direction = (Transform.Basis * new Vector3(inputDir.X, 0, inputDir.Y)).Normalized();
    
    	if (direction != Vector3.Zero)
    	{
    		velocity.X = direction.X * Speed;
    		velocity.Z = direction.Z * Speed;
    	}
    	else
    	{
    		velocity.X = Mathf.Lerp(Velocity.X, 0, Speed * (float)delta);
    		velocity.Z = Mathf.Lerp(Velocity.Z, 0, Speed * (float)delta);
    	}
    	
    	Velocity = velocity;
    	MoveAndSlide();
    
    	velocity.Y = 0;
    	_animationTree.Set("parameters/walking/blend_amount", velocity.LimitLength(1).Length());
    	if (Mathf.IsZeroApprox(velocity.Length())) return;
    
    	_visual.LookAt(Position + 10 * velocity, Vector3.Up, true);
    	//var angle = 0;
    	//var transform = _visual.Transform;
    	//transform.Basis = new(Vector3.Up, angle);
    	//_visual.Transform = transform;
    }
    private Vector2 GetInputDirectionWithAngles()
    {
    	Vector2 inputDirection = Vector2.Zero;
    	
    	// Gather the axis inputs
    	float horizontal = Input.GetActionStrength("right") - Input.GetActionStrength("left");
    	float vertical = Input.GetActionStrength("up") - Input.GetActionStrength("down");
    
    	if (vertical > 0) 
    	{
    		// Moving up
    		inputDirection.Y += Mathf.Sin(UpwardAngleDeg * (Mathf.Pi / 180.0f)) * vertical;
    		inputDirection.X += Mathf.Cos(UpwardAngleDeg * (Mathf.Pi / 180.0f)) * horizontal;
    	}
    	else if (vertical < 0)
    	{
    		// Moving down
    		inputDirection.Y += Mathf.Sin(DownwardAngleDeg * (Mathf.Pi / 180.0f)) * vertical;
    		inputDirection.X += Mathf.Cos(DownwardAngleDeg * (Mathf.Pi / 180.0f)) * horizontal;
    	}
    	else
    	{
    		// Just walking horizontally or standing still
    		inputDirection.X = horizontal;
    		inputDirection.Y = vertical;
    	}
    
    	return inputDirection.Normalized();
    }
    
    public void OnAttackTimeOut()
    {
    	_attackTimer.Start();
    
    	var nearestEnemy = _gameManager.GetNearestEnemy();
    	if (nearestEnemy == null) return;
    
    	//nearestEnemy.TakeDamages();
    }
    
    public void TakeDamages(uint damages)
    {
    	_lifepoints -= Math.Clamp(damages, 0, _lifepoints);
    }
    
    internal void Heal(uint damages)
    {
    	_lifepoints = Math.Clamp(_lifepoints + damages, 0, MaxLifepoints);
    }
    

    }

  14. Assistant

    It looks like the GetInputDirectionWithAngles method in your code isn't accounting for the movement of your character correctly in the Y direction related to 3D world space when dealing with upward and downward movement.

    Your character is likely moving downwards because inputDirection.Y is being modified with a sin value that's responding to vertical input directly. This code assumes that the positive Y direction in your game engine corresponds to "up" in 3D space when it typically represents "forward".

    Here's a revised version of the GetInputDirectionWithAngles method that should correct the implementation assuming that:

    • Positive Y in the inputDirection variable represents moving forwards in world space, not upwards.
    • The UpwardAngleDeg and DownwardAngleDeg represent angles in the horizontal plane from forward towards the up and down directions, respectively.
    private Vector3 GetInputDirectionWithAngles()
    {
        float horizontal = Input.GetActionStrength("right") - Input.GetActionStrength("left");
        float vertical = Input.GetActionStrength("up") - Input.GetActionStrength("down");
    
        // Assume initial direction is forward in world space
        Vector3 inputDirection = new Vector3(0, 0, -1); // In Godot, -Z is typically forwards
    
        // Modify the x and z components of the direction based on the input and desired angle
        inputDirection.x = horizontal;
        if (vertical > 0)
        {
            inputDirection = inputDirection.Rotated(Vector3.Up, Mathf.Deg2Rad(UpwardAngleDeg));
        }
        else if (vertical < 0)
        {
            inputDirection = inputDirection.Rotated(Vector3.Up, Mathf.Deg2Rad(DownwardAngleDeg));
        }
    
        return inputDirection.Normalized();
    }
    

    Additionally, ensure that the direction you are calculating is appropriate for the coordinate system of your game.

    To use this modified method, you will also need to adjust your _PhysicsProcess method because GetInputDirectionWithAngles now returns a Vector3 instead of a Vector2:

    public override void _PhysicsProcess(double delta)
    {
        // ... existing code ...
    
        Vector3 inputDir = GetInputDirectionWithAngles();
    
        if (inputDir != Vector3.Zero)
        {
            Vector3 planarVelocity = new Vector3(inputDir.x, 0, inputDir.z) * Speed;
            velocity.x = planarVelocity.x;
            velocity.z = planarVelocity.z;
        }
        else
        {
            // Decelerate to a stop
            velocity.x = Mathf.Lerp(Velocity.x, 0, Speed * (float)delta);
            velocity.z = Mathf.Lerp(Velocity.z, 0, Speed * (float)delta);
        }
    
        // ... existing code to handle jumping and gravity...
    
        // Move the character
        Velocity = MoveAndSlide(Velocity, Vector3.Up);
    }
    

    Make these adjustments and test your player movement again. Ensure you're working with the right axes for both input handling and translating that input into world movement.

  15. User

    again :

    /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(104,62): 'Mathf' does not contain a definition for 'Deg2Rad'

  16. Assistant

    I apologize for the confusion. It appears there might have been a misunderstanding regarding the Godot API in the previous responses. The Godot Mathf class doesn't have a Deg2Rad constant. Instead, there is Deg2Rad() as a method in the Godot Mathf class in Godot 3.x but not in Godot 4.x. In Godot 4.x, you have to calculate the radians yourself using the formula radians = degrees * (PI / 180).

    Here's a correct implementation for Godot 4.x:

    private const float RadiansPerDegree = Mathf.Pi / 180.0f;
    
    private Vector3 GetInputDirectionWithAngles()
    {
        float horizontal = Input.GetActionStrength("right") - Input.GetActionStrength("left");
        float vertical = Input.GetActionStrength("up") - Input.GetActionStrength("down");
    
        // Start with a forward direction (negative z in Godot is forward)
        Vector3 inputDirection = new Vector3(0, 0, -1);
    
        // Rotate the default forward direction by the upward or downward angle based on vertical input
        if (vertical > 0)
        {
            // Moving upwards at an angle
            inputDirection = inputDirection.Rotated(Vector3.Up, UpwardAngleDeg * RadiansPerDegree);
        }
        else if (vertical < 0)
        {
            // Moving downwards at an angle
            inputDirection = inputDirection.Rotated(Vector3.Up, DownwardAngleDeg * RadiansPerDegree);
        }
    
        // Apply the horizontal input as a left or right rotation on the y-axis
        inputDirection = inputDirection.Rotated(Vector3.Up, horizontal * RadiansPerDegree);
    
        return inputDirection.Normalized();
    }
    

    In this revised method, RadiansPerDegree is calculated once as a constant and used to convert angle degrees to radians. The GetInputDirectionWithAngles method now properly rotates the direction without using a non-existent Mathf.Deg2Rad method.

    Note that in Godot, rotating around Vector3.Up will rotate the vector around the y-axis, typically used for left and right rotations. If you want to tilt the forward vector up and down, you would typically rotate around the x-axis or another side vector, not the up vector. However, this depends on the orientation of your game world and the desired movement behavior. If you're trying to simulate a character walking up and down slopes or ramps at 45-degree angles, you may need to approach this differently and adjust the logic accordingly.

  17. User

    /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(64,22): Cannot implicitly convert type 'Godot.Vector3' to 'Godot.Vector2'

  18. Assistant

    I apologize for the oversight. The error suggests that there's an attempt to assign a Vector3 to a Vector2, which are distinct types with different numbers of components and cannot be directly converted this way.

    The problem likely arises from this section of the code:

    Vector2 inputDir = GetInputDirectionWithAngles();
    

    Yet, the method GetInputDirectionWithAngles returns a Vector3. You should change the type of inputDir to Vector3.

    Here's the corrected line:

    Vector3 inputDir = GetInputDirectionWithAngles();
    

    The function definition must also reflect the fact that it returns a Vector3:

    private Vector3 GetInputDirectionWithAngles()
    {
        // Your existing implementation...
    }
    

    Then, you should correctly adjust the _PhysicsProcess method to account for this change, using the inputDir Vector3 to get a movement vector that only affects the horizontal plane (X and Z axes), ignoring the Y component which usually represents the vertical axis in Godot.

    Here's how you might adjust the _PhysicsProcess method:

    public override void _PhysicsProcess(double delta)
    {
        // ... existing code ...
    
        // Add the gravity. 'velocity' should already be a Vector3.
        if (!IsOnFloor())
            velocity.y -= gravity * (float)delta;
    
        // Get the input direction with modified angles for upward and downward movement
        Vector3 inputDir = GetInputDirectionWithAngles();
    
        if (inputDir != Vector3.Zero)
        {
            // Multiply only the horizontal components (X and Z) by Speed
            velocity.x = inputDir.x * Speed;
            velocity.z = inputDir.z * Speed;
        }
        else
        {
            // Decelerate to a stop
            velocity.x = Mathf.Lerp(velocity.x, 0, Speed * (float)delta);
            velocity.z = Mathf.Lerp(velocity.z, 0, Speed * (float)delta);
        }
    
        // Use the 'Velocity' property of 'CharacterBody3D' for movement and collision detection
        Velocity = MoveAndSlide(velocity, Vector3.Up);
    
        // Remaining processing...
    }
    

    Make sure the Velocity is set correctly when calling MoveAndSlide().

    Ensure all instances in your code where Vector2 and Vector3 are mixed are correctly fixed to use the appropriate vector type. After making these changes, try compiling your project again to check if the problem has been resolved.

  19. User

    now it goes to left and right, I want it to go in a -45 rotation on x axis and + 45 when going up

  20. Assistant

    To achieve movement at a -45 degree angle when going downwards and a +45 degree angle when going upwards along both the X and Z axes, you need to use a combination of horizontal and vertical inputs to create a direction vector that represents your desired movement in 3D space.

    The method GetInputDirectionWithAngles should create this direction vector based on the input. It needs to take into account both the horizontal and vertical input and construct a directional vector considering the 3D space of the game world.

    Here's how you could adjust your GetInputDirectionWithAngles method. It will take the horizontal input (left/right) and construct a direction vector that tilts up or down at a 45-degree angle based on the vertical input (up/down):

    private Vector3 GetInputDirectionWithAngles()
    {
        Vector3 inputDirection = Vector3.Zero;
        
        float horizontal = Input.GetActionStrength("ui_right") - Input.GetActionStrength("ui_left");
        float vertical = Input.GetActionStrength("ui_down") - Input.GetActionStrength("ui_up");
    
        if (Math.Abs(vertical) > Mathf.Epsilon) // Prevent division by zero if vertical is 0
        {
            // Calculate the tilt angle based on the vertical input
            float tiltAngle = (vertical > 0) ? UpwardAngleDeg : DownwardAngleDeg;
            // Calculate the tilt using tan(angle) = opposite/adjacent (rise over run), and run is 1 unit, so rise = tan(angle)
            float rise = Mathf.Tan(Mathf.Deg2Rad(tiltAngle));
    
            // Apply horizontal movement and tilt in the direction
            inputDirection = new Vector3(horizontal, rise, 1).Normalized();
        }
        else
        {
            inputDirection = new Vector3(horizontal, 0, 1).Normalized(); // Only horizontal movement when not moving up or down
        }
    
        return inputDirection;
    }
    

    Now ensure that when you handle player movement inside the _PhysicsProcess method, you apply the directional input to move the character:

    public override void _PhysicsProcess(float delta)
    {
        // ... existing code for applying gravity ...
    
        // Get the input direction with angles for upward and downward movement
        Vector3 inputDir = GetInputDirectionWithAngles();
    
        // Handle horizontal movement based on input direction
        if (inputDir != Vector3.Zero)
        {
            velocity.x = inputDir.x * Speed;
            velocity.y = inputDir.y * Speed; // Apply the velocity in the Y (vertical) axis based on the tilted direction
            velocity.z = inputDir.z * Speed;
        }
        else
        {
            // Decelerate to a stop
            velocity = velocity.LinearInterpolate(Vector3.Zero, Speed * delta);
        }
    
        // Update player velocity
        Velocity = velocity;
    
        // Move and slide with velocity
        // Depending on how you handle collisions, you may need to adjust this line
        Velocity = MoveAndSlide(Velocity, Vector3.Up);
    
        // ... remaining processing, like animations ...
    }
    

    Remember that the y component in your velocity represents vertical movement in 3D space (up and down). The MoveAndSlide method is used to move the character and calculate collisions based on the velocity, so it should work correctly if the velocity is set up accurately.

    Make sure you've adjusted any other parts of your code to correctly handle this approach to 3D movement.

  21. User

    again /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(104,33): 'Mathf' does not contain a definition for 'Deg2Rad'

  22. Assistant

    In Godot, Mathf.Deg2Rad is a pre-defined constant in Godot 3.x that converts degrees to radians by multiplication, but if it's causing issues or if it's not available in Godot 4.x, you can simply define the conversion factor yourself. The mathematical relationship between degrees and radians is that 180 degrees is equal to Pi radians. Therefore, to convert degrees to radians, you multiply the number of degrees by Pi / 180.

    Replace the usage of Mathf.Deg2Rad as follows:

    // Replace Mathf.Deg2Rad with the mathematical conversion (Pi / 180):
    private const float DegToRad = Mathf.Pi / 180.0f;
    

    Then, you can use DegToRad to convert degrees to radians in your calculations:

    private Vector3 GetInputDirectionWithAngles()
    {
        Vector3 inputDirection = Vector3.Zero;
    
        float horizontal = Input.GetActionStrength("ui_right") - Input.GetActionStrength("ui_left");
        float vertical = Input.GetActionStrength("ui_down") - Input.GetActionStrength("ui_up");
    
        if (Math.Abs(vertical) > Mathf.Epsilon) // Ensure we're not dividing by zero if vertical is 0
        {
            // Calculate the tilt angle based on the vertical input
            float tiltAngle = (vertical > 0) ? UpwardAngleDeg : DownwardAngleDeg;
            // Calculate the tilt using tan(angle) = opposite/adjacent (rise over run), and run is 1 unit
            float rise = Mathf.Tan(tiltAngle * DegToRad);
    
            // Apply horizontal movement and tilt in the direction
            inputDirection = new Vector3(horizontal, rise, 1).Normalized();
        }
        else
        {
            // No vertical input, apply only horizontal movement
            inputDirection = new Vector3(horizontal, 0, 1).Normalized();
        }
    
        return inputDirection;
    }
    

    This code defines a DegToRad constant which you use instead of Mathf.Deg2Rad. It uses the mathematical definition of the relationship between degrees and radians to perform the conversion wherever needed.

    Also, note that I am normalizing the new direction vector to ensure consistent movement speeds regardless of the combination of input directions.

    Update this part of your code and try building the project again to ensure that the error with Mathf.Deg2Rad is resolved.

  23. User

    /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(76,24): 'Vector3' does not contain a definition for 'LinearInterpolate' and no accessible extension method 'LinearInterpolate' accepting a first argument of type 'Vector3' could be found (are you missing a using directive or an assembly reference?)

    /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(80,14): No overload for method 'MoveAndSlide' takes 2 arguments

  24. Assistant

    In Godot 4, you should use Vector3.Lerp instead of Vector3.LinearInterpolate. Secondly, the signature of the MoveAndSlide method might have changed between Godot versions, requiring you to adjust your method calls accordingly.

    For the Vector3.LinearInterpolate issue, replace your usage of velocity.LinearInterpolate with Vector3.Lerp:

    velocity = velocity.Lerp(Vector3.Zero, Speed * delta);
    

    For the MoveAndSlide issue, in Godot 3.x MoveAndSlide takes two arguments, but in Godot 4.x, it seems that it takes only one argument by default. You'll need to call MoveAndSlide() with the appropriate number of arguments.

    Here's how you might update the MoveAndSlide call if using Godot 4.x:

    Velocity = MoveAndSlide(Velocity);
    

    As a side note, if you were depending on the second parameter to be the up direction (e.g., for implementing slope sliding mechanics), you might want to check the Godot 4.x documentation to see how to handle slopes with the new API.

    In summary, update the relevant lines of code in your _PhysicsProcess method:

    public override void _PhysicsProcess(float delta)
    {
        // ... existing code for applying gravity ...
    
        // Get the input direction with angles for upward and downward movement
        Vector3 inputDir = GetInputDirectionWithAngles();
    
        // Handle horizontal movement based on input direction
        if (inputDir != Vector3.Zero)
        {
            velocity.x = inputDir.x * Speed;
            velocity.y = inputDir.y * Speed; // Apply the velocity in the Y (vertical) axis based on the tilted direction
            velocity.z = inputDir.z * Speed;
        }
        else
        {
            // Decelerate to a stop using Lerp
            velocity = velocity.Lerp(Vector3.Zero, Speed * delta);
        }
    
        // Use MoveAndSlide with velocity
        Velocity = MoveAndSlide(Velocity);
    
        // ... remaining processing, like animations ...
    }
    

    These updates should resolve the compiler issues. After making these changes, you can try building the project again.

  25. User

    /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(76,43): Argument 2: cannot convert from 'double' to 'float'

  26. Assistant

    The error message you're seeing indicates a type mismatch where a double value is being passed to a function that expects a float. In C#, float is a single-precision floating-point value, while double is a double-precision floating-point value.

    To address the error:

    1. Cast the double delta value to float at the point of error (since delta usually is a float in Godot, make sure you have consistent use of types).
    2. Ensure your project uses the same floating-point precision (float) throughout, as that's what Godot generally uses.

    Here's how you'd correct the line of code in your _PhysicsProcess method that's causing the error:

    // Ensure delta is cast to float if it's a double
    velocity = velocity.Lerp(Vector3.Zero, Speed * (float)delta);
    

    Make sure to inspect your _PhysicsProcess method's signature; the delta parameter should be a float according to Godot's typical API:

    public override void _PhysicsProcess(float delta)
    {
        // Your code here...
    }
    

    If you've received the delta parameter as a double somewhere (by incorrectly declaring it), you need to change the declaration to float instead because Godot's _Process and _PhysicsProcess methods pass it as such.

    Apply these changes, and that should solve the error about converting a double to a float. Rebuild your project to verify.

  27. User

    /home/rickard/Documents/JpGame/Scripts/Players/Player.cs(80,14): Cannot implicitly convert type 'bool' to 'Godot.Vector3'

    	Velocity = velocity;
    	Velocity = MoveAndSlide();
    
  28. Assistant

    The error message you are encountering is because you're trying to assign the result of MoveAndSlide()—which returns a bool indicating whether a collision occurred—to Velocity, which is a Vector3. In Godot, the MoveAndSlide() function not only moves the object but also updates the Velocity property of the object internally to reflect the velocity after the slide operation. So you don't need to manually assign the return value of MoveAndSlide() to Velocity.

    Here's how you can update the _PhysicsProcess(float delta) method in your Player class to fix this issue:

    public override void _PhysicsProcess(float delta)
    {
        // ... other code for jump calculation, gravity, and input handling ...
    
        // Apply the horizontal and vertical movement based on the input direction
        if (inputDir != Vector3.Zero)
        {
            velocity.x = inputDir.x * Speed;
            velocity.y = inputDir.y; // Y is typically up/down in Godot 3D, and we are assuming gravity is being handled elsewhere
            velocity.z = inputDir.z * Speed;
        }
        else
        {
            // Decelerate to a stop using Lerp
            velocity = velocity.Lerp(Vector3.Zero, Speed * delta);
        }
    
        // Update the internal Velocity property of your CharacterBody3D before calling MoveAndSlide
        // Call MoveAndSlide() with your velocity vector and the up direction of the character
        Velocity = velocity; // Set the physics body's velocity to your calculated velocity
        MoveAndSlide(Velocity, Vector3.Up); // Move the character and slide along the ground and obstacles
    
        // ... remaining processing, such as animation handling ...
    }
    

    In this snipped of code, Velocity = velocity; is updating the physics body's Velocity based on your calculated velocity vector. Then, MoveAndSlide() is called with the Velocity parameter to make the character move. It automatically calculates collisions and adjusts the Velocity based on those collisions. You don't need to manually assign Velocity from the return value of MoveAndSlide().

    Also, please ensure the parameters passed to MoveAndSlide() are correct. The first parameter is typically the velocity vector, and the second parameter is the "up" direction, which is used to determine what is considered ground for the purposes of functions like IsOnFloor().

    Adjust your code according to the snippet provided, and ensure the rest of your logic is aligned with Godot's physics engine, then try to rebuild your project.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.