In this episode, we review syntax for setting up a Collision Event, where we crash the Chasers into our Asteroids. First we create a couple of Components, HealthData and DeathColliderTag. Then we create two Systems, one to remove "dead" Entities and one to handle the collision between Chaser and Asteroid.
Starter project:
bit.ly/2XvPrcU
Final project:
bit.ly/2A2WO2z
This is a longer episode. Use the timestamps below:
TIMESTAMPS
0:44 Package Versions
1:14 Revised Asteroid Setup
1:55 Revised Chaser Setup
2:13 Starter Project: CollisionEvent Scene
2:31 Chaser Physics Authoring
3:11 HealthData
4:09 RemoveOnDeathSystem
7:46 DeathColliderTag
8:26 DeathOnCollisionSystem
9:49 DeathOnCollisionSystem: Setup Physics Worlds
11:25 DeathOnCollisionSystem: ComponentDataFromEntity
12:52 DeathOnCollisionSystem: Execute method
15:29 PlayTest
16:37 More Entities
17:23 Outro
Software: Unity 2019.3.15f1 (MacOS) with Unity Physics 0.3.2, HybridRender Version 0.4.1 and Entities Version 0.9.0 from the PackageManager.
Also check out the previous videos in this series:
DOTS Gameplay: Basic Player Input and Movement:
• DOTS Gameplay: Basic P...
DOTS Gameplay: Tags:
• DOTS GamePlay: Tags
DOTS Gameplay: ComponentDataFromEntity:
• DOTS Gameplay: Compone...
DOTS Gameplay: EntityQuery
• DOTS Gameplay: EntityQ...
DOTS Gameplay: Trigger Events
• DOTS Gameplay: Trigger...
Want to learn more about DOTS and ECS? Sign up for our mailing list to get notified when the premium course releases:
gameacademy.sc...
Want to support this channel? Subscribe to our premium courses at GameAcademy.school:
gameacademy.sc...
Let’s build something cool together!
Ready to go Pro? Get Unity Pro here (affiliate link):
prf.hn/click/ca...
26 авг 2024