Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating very basic initial procedural demo scene #174

Merged
merged 17 commits into from
Sep 8, 2024

Conversation

TheDuckCow
Copy link
Owner

PR aiming to address the majority of the scope of this task, currently only partially done so far:

#170

@TheDuckCow TheDuckCow linked an issue Jun 27, 2024 that may be closed by this pull request
5 tasks
@TheDuckCow TheDuckCow mentioned this pull request Jun 27, 2024
5 tasks
Does not put the camera on rails just yet, need to do more lane fitting
work for that first.
Not quite working as intended, and the solution is proving a little more
complicated than it seems it should be. Some nuance it getting the right
orientation of the cam vs the lane is still to be done.
Reworked the procedural demo to include spawned traffic and simple
on-rails movement. Vehicle culling is not working just yet. Player is
able to control their vehicle with arrow keys including lane changes.
@TheDuckCow TheDuckCow marked this pull request as ready for review September 5, 2024 17:21
@TheDuckCow
Copy link
Owner Author

With the most recent readme page setup, I think this is ready for merging into dev. Some improvements remain, but not the highest priority for right now.

FYI @brickyt that I made a couple more updates in the most recent version - nothing substantially changed since we spoke, but to summarize:

  • Added a toggle which is set to true on the RoadLaneAgent to auto visualize the lane its currently on
  • Traffic culling had some edge cases which are mostly resolved now; I ended up implementing an 'auto free' feature on RoadLanes to delete all vehicles registered to that lane. For that reason, the player's lane agent now does not register itself to a lane (but it still tracks which lane its on by itself).
  • Car spawning is a little more organic now, picking a random position along their initial lane curve
  • As mentioned, reduce to just spatials - so no physics being calculated, and no collision meshes.
  • Fixed an issue where going backwards wasn't being calculated correctly.

Improvement remaining

  • There's a slight flicker of the camera orientation in some cases when going from one lane to the next. This is due (at least partially) to not tracking the "remainder" distance along the next curve when calculating the next point for the look_at. If you were to disable the look at, cars would not rotate but there'd be no flicker, indicating it's only a problem of rotation (for which the camera is hard-parented). This is an improvement I'll be making in RoadLaneAgent eventually, but nothing to worry much about right now.

@TheDuckCow TheDuckCow merged commit e390173 into dev Sep 8, 2024
@TheDuckCow TheDuckCow deleted the 170-create-procedural-use-case-demo branch September 8, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create procedural use case demo
1 participant