Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

PMC__SK

5
Posts
6
Following
A member registered Jun 04, 2021 · View creator page →

Creator of

Recent community posts

Understood, works fine. Went far back to the 2017 version and it works. Thanks, will continue testing it. 

I got this template today, basically starting from zero on Unity. Added the template, when tryied to start the race it wil turn wheels right/left and lights the breaks ... but won't move forward. I did watch the first part of the tutorial video (in which you place the vehicle mesh, rotate it, and drive), but it seems like it was preset ... not for me or clearly I am missing something basic. I am testing it on a Windows 11 pc - Unity 2022.3.48f1. Everything seems to be ok,  except the forward movement/drive.

Hi, great template. My question might be a basic one since I am still a beginner/learning Godot. So, I got your template (which is fully functional). In my tests I changed the camera/cars/expanded track and a few other details ... but when the race is completed (like all cars pass thru the finish line and shows the podium), I was trying to change scene (with a simple button in the podium window). At that point, the game crashed referencing two lines in the if statement (in car_controller.gd) ...

if is_AI and RaceManager.is_countdown_finished: 

     # Calculate the direction to the target 

     var target_direction = (waypoints[current_waypoint].global_transform.origin - model.global_transform.origin).normalized() 

     # Calculate the cross product of the car's forward direction and the target direction 

     var cross = model.global_transform.basis[2].cross(target_direction)

So, I added a silght modification to your code ... but cannot manage to fix the issue. Here is what I did, might be helpful ...

if is_AI and RaceManager.is_countdown_finished:

    # Check if the model and the current waypoint are still valid and inside the tree

    if is_instance_valid(model) and model.is_inside_tree() and is_instance_valid(waypoints[current_waypoint]) and waypoints[current_waypoint].is_inside_tree():

        # Calculate the direction to the target

        var target_direction = (waypoints[current_waypoint].global_transform.origin - model.global_transform.origin).normalized()

        

        # Calculate the cross product of the car's forward direction and the target direction

        var cross = model.global_transform.basis[2].cross(target_direction)

Now it does change scene, but the cars from the previous race remain in the middle of the screen, and if I try to select a car for a new race ... it crashed again.

My plan was for making a restart race or go to next race ... but trying to change scene just leads to another crashed game.


Please advise,

Thanks in advance.

Awesome, thanks for the quick response and the flawless solution. Looking forward to any of your future releases (if related with 3d scenarios ... better).

(2 edits)

Possibly the answer is simple, but I am really a beginner in Godot (4.2 stable). Got the pack, and when running the scene I got some errors that required changing func names in order to make it start. But then, when it worked I saw the log ... 

--- Debug adapter server started ---

--- GDScript language server started on port 6005 ---

  Attempt to open script 'res://addons/save_system/save_system.gd' resulted in error 'File not found'.

  Failed loading resource: res://addons/save_system/save_system.gd. Make sure resources have been imported by opening the project in the editor at least once.

  Can't autoload: res://addons/save_system/save_system.gd.

  editor/editor_autoload_settings.cpp:551 - Condition "!info->node" is true. Continuing.

It is missing the autoload file too. My interest was for saving the player's location ... and I am not able to simply make the save. 

Any advise will be greatly appreciated.