Feedback for Section: "Obstacle Assault"

About Forcing Character Collisions, I have found that setting an X and Y delta makes the character move a little when colliding with the pushing squares. However, setting the Z, to for instance 0.1 and -0.1, will not produce this little quirk. :slight_smile:

Iā€™m having a similar issue to FrenzyBrz but potentially worse.
For some reason, Iā€™m not getting intellisense/auto-complete. My code runs fine and all, Iā€™m half way through the section, but I donā€™t see things properly colorized, hovering over items doesnā€™t give me more info, no tab completion for anything MS C++ nor Unreal.

Hereā€™s a screenshot.
https://drive.google.com/file/d/1KV8YffI0p6YgXOjekstmZ34yvmmPlHZ8/view?usp=sharing

I donā€™t know if having VS 2019 and 2017 already prior to this messed something up, I uninstalled them and now only have 2022, but still no difference.

I have the two extensions suggested, C/C++ by Microsoft and the Unreal Engine 4 Snippets by CaptnCaps.

Here is my .vscode/c_cpp_properties.json file.

Not sure if itā€™s important but I see people mentioning it in similar situations.

Thanks in advance for any suggestions people may have!

Edit: It seems I can no longer use the live code compile now that I have removed the old versions of Visual Studio.
Error message:

Manual recompile triggered
---------- Creating patch ----------
Running E:\UE_5.0\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.exe -Target="ObstacleAssaultEditor Win64 Development -Project=""C:/Users/Sean/Documents/Unreal Projects/ObstacleAssault/ObstacleAssault.uproject""" -LiveCoding -LiveCodingModules="E:/UE_5.0/Engine/Intermediate/LiveCodingModules.txt" -LiveCodingManifest="E:/UE_5.0/Engine/Intermediate/LiveCoding.json" -WaitMutex -LiveCodingLimit=100
  A fatal error occurred. The required library hostfxr.dll could not be found.
  If this is a self-contained application, that library should exist in [E:\UE_5.0\Engine\Binaries\DotNET\UnrealBuildTool\].
  If this is a framework-dependent application, install the runtime in the global location [C:\Program Files\dotnet] or use the DOTNET_ROOT environment variable to specify the runtime location or register the runtime location in [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x64\InstallLocation].
  
  The .NET Core runtime can be found at:
    - https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=win10-x64
Build failed.

Going to try to fix this, but any suggestions for this too would be appreciated.

Edit 2: Tried installing .net SDK 6.0 but it didnā€™t like that, it specifically wanted 3.1. Why would it be using something so outdated? Itā€™s nearly end of life. Is this also because I had old VS versions installed? Do I need to rebuild or tell it to switch to 6.0 somewhere? It seems to be running fine now either way.

Last edit: Iā€™ve just switched to Visual Studio 2022 instead. Everything is fine here.

How are we supposed to recompile in VSCode? Are you talking about the command in drop down menu from the Terminal ā†’ Run Build Task?

I have the same issue and also canā€™t find the solution. Canā€™t find an option to recompile in VSCode.

For some reason, my live coding no longer works, after the first time I used it last night. If I try, then it goes through the compiling process like normal, however no changes end up being made.

Since then Iā€™ve had to compile my code in VSCode itself, get the message saying it canā€™t compile because the editor is currently open and running, and then I can use the live code compiler and it works properly. Obviously, though, thatā€™s a process twice as long as what I want.

Is it possible some keys were pressed overnight, or I did something that made it like this? Or, how could I go about fixing it so that live code compiler makes the correct changes again? Thanks for reading.

I ran into something similar earlier, I would suggest closing everything and just to be sure, restart your computer, that fixed things up for me.

In the example he did switch the starting pointā€¦
i donā€™t like it very much, is my solution worst in term of computation?

	FVector currentLocation = GetActorLocation();
	currentLocation = currentLocation + (MoveForeward ? 1 : -1)*(PlatformVelocity * DeltaTime);
	SetActorLocation(currentLocation);

	Distance = FVector::Dist(StartLocation, currentLocation);
	if(Distance > DistanceToMove){
		MoveForeward = false;
	}else if(Distance<0){
		MoveForeward = true;
	}

Section 8 - Compiling a C++ Project - We add a C++ file to our project and learn to compile the editor.

Iā€™ve gotten stuck try to compile the C++ code. I do the Run Build Task under Terminal, but I do not see any build tasks (see below).

How can I fix this issue? Iā€™ve been looking throughout all of the lessons for installing (section 5 -8) and I cannot find anything. Any ideas?

It looks like youā€™ve closed the terminal box. Not to worry itā€™s easy to get back. Go to ā€œViewā€ at the top-most toolbar, and select ā€œTerminalā€ from the drop down.

Alternatively, you can just press Ctrl + Tilda Key to bring it up again.

Hope this helps.

I am having this same problem. Have you figured it out yet?

Nice to know, but that does not solve my issue. I still get no run build task.

Though I guess I notice some errors?

Did you change the project file path to somewhere else?

Not that Iā€™m aware of. I just followed the tutorial and saved it and then tried to open VS and I got these errors trying to run build tasks.

1 Like

Open your project in unreal engine, click on tools and then refresh the visual studio code project. After doing these steps again try to run the build task. Maybe this will solve your issue, I am not quite sure though.

1 Like

Awesome! That did the trick. Thank you so much! I was able to find and run the build task in the tutorial. No problems detected so far.

1 Like

Keep Going :+1:

1 Like

Iā€™lll admit Iā€™m going a bit nuts over

CurrentLocation = CurrentLocation + MovementVector * Deltatime (or whatever it was again)

Folks, Ima bake your noodle;-

CurrentLocation += MovementVector * Deltatime;

Means the exact thing. The += operator just expands out to val = val +

Hopefully thatā€™ll come up later.

Privacy & Terms