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
*************************************************
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
*************************************************