@ForgingStation
  @ForgingStation
Forging Station | How to flip an AI car right side up? Unity Hybrid-ECS/DOTS @ForgingStation | Uploaded July 2020 | Updated October 2024, 19 minutes ago.
In this short video, we will implement a very basic vehicle reset/flipping system which can flip our car back upright after it topples.

We are going to deduce the orientation of our vehicle using the dot product. We are already passing the local to world Matrix from which we could have figured the necessary local transform direction - upward pointing direction.
Fortunately, this time Unity has a struct that can do this job for us.

Now that we have a hook to figure if our vehicle has toppled, we will simply reset the rotation to that of initial rotation. we can make it aesthetically more pleasing and accurate if necessary, by lerping the rotation values & orienting vehicle to current forward direction etc., but we won't make this too complicated here

Please watch my previous videos to get a better understanding of the system we have implemented so far.

This is an excellent use case demonstrating how classic Game Objects can be mixed with Unity ECS/DOTS in a hybrid fashion to achieve desired behaviour.

Unity Hybrid-ECS/DOTS Car Controller - youtu.be/f0viJi8vi5I
AI Car - Unity Hybrid ECS/DOTS - youtu.be/qjfjdYVKQu0
AI Car Testing on a Massive terrain - youtu.be/L7Uhk9zhEjo

*************************************************
Terrain textures - textures.com

Procedural Terrain - Map Magic 2- assetstore.unity.com/packages/tools/terrain/mapmagic-2-165180

Wheels - assetstore.unity.com/packages/3d/vehicles/land/tire-pack-147202
*************************************************
How to flip an AI car right side up? Unity Hybrid-ECS/DOTSNo Ray Casting/Overlap Queries!! Reverse using Ackermann Steering Geometry - Unity DOTS/ECSBattle Simulation Basic Setup - Unity ECS/DOTSStructs Only! Proper Way To Burst Compile & Change Material Properties While Using - Unity DotsCan AI cars finish the race? Unity Hybrid-ECS/DOTS - TestingApply Force Upon Impact - Unity DOTS PhysicsCrowd Simulation Part 2 - The Movement Cost - Not sure why I do this!!Separation Based Collison Avoidance - AI Cars - Unity ECS/DOTSSimple Flocking Simulation - Boids - Unity ECS/DOTSGetting Started With Procedural Content Generation with Wave Function Collapse - UnitySpawn and operate on entities using only structs - Unity DOTSEasily add navigation capability to any entity - Unity DOTS navigation with nav mesh query

How to flip an AI car right side up? Unity Hybrid-ECS/DOTS @ForgingStation

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER