Tute 3 - Week 4
This tute we covered NavMesh Agents, Obstacles, and some basic raycasting!
I'm way back into my comfort zone here with Unity & development - modelling aint it. Scripting? Lets get it.
Repercussions from my dismal modelling skills have led me to using capsules to imitate players here so please forgive that - but the scripting is still there!
The first task was to practise baking in some navigation meshes for AI to move around on - this is basically a rendered map of the terrain that, with given constraints, will tell an AI unit where it can or cannot move, where it should jump from/to and where it should fall from/to:
In the map above you can see all the blue surfaces are available for movement by the cyan (do you pronounce cyan with a soft c or a hard c?) capsule. All the little lines and circles show the special movement locations like jumping and falling. The movement is implemented by raycasting - when the user left-clicks anywhere in the map, a freaking laser beam registers where the user clicked and passes that information to the AI controlling the cyan pill and tells it to move to those coordinates.
Applying these same principals of raycasting, and going back to programming that I can actually do, when the user now right-clicks a red pill from the seventh circle spawns into the game and begins heading toward the cyan pill's location:
(I admit, I hadn't made the pill cyan at this stage)
That's fun, right? Well put those socks back on - the final task was a simple movement script to make the red pills chase the cyan pill because the cyan pill stole their.. lunch.. money?:
That's all folks! See you in the self study (:
KIT207 Portfolio
Coursework - Semester 2 2021
Status | In development |
Category | Other |
Author | SkadiTas |
More posts
- Self Study 4 - ?saedIAug 09, 2021
- Self Study 4 - A Bloody Mess (The pun, not the dilemma)Aug 09, 2021
- Self Study - Module 3Aug 03, 2021
- Self Study/Tute Work - Week 2Jul 25, 2021
- Self Study Week 1!Jul 16, 2021
Leave a comment
Log in with itch.io to leave a comment.