informa
2 min read
Blogs

RTS Unit to Unit Collisions in Unity Software: Deterrence - Video Devlog 11

The eleventh weekly devlog for Deterrence. This week I solve unit to unit collisions and add the tower building to defensive structures.

A tower defense mixed with real-time strategy where you repel attacking sentient AI robots until they give up.

Unit to Unit Collisions in Unity Software

To mimic Starcraft 2 unit collisions, I gave the units capsule colliders and rigid bodies. In the unit code, I would adjust the mass of the rigid body so that moving units have greater mass than standing units.

By adding physics to the units and allowing them to nudge one another, this created problems with group movement. In many cases, units would be nudged so far from their path that a block would come between the unit and its next node causing the unit to get stuck. To solve this, the group movement was modified so that node offsets are much closer to the leaders nodes, box and sphere checks were used instead of raycasts to find blocks between nodes, and instead of simplifying the path, all the nodes are used to keep units on path.

Towers

The tower will be a mid to late game defense like bunkers, but they will lack in defense. The towers will instead give units a range bonus. I plan on towers having upgrades to their structure like steel, and concrete to boost their hit points and amount of garrisoned units. Also towers should have the ability to add a mounted machine gun just like bunkers and sandbag walls.

Latest Jobs

Treyarch

Playa Vista, California
6.20.22
Audio Engineer

Digital Extremes

London, Ontario, Canada
6.20.22
Communications Director

High Moon Studios

Carlsbad, California
6.20.22
Senior Producer

Build a Rocket Boy Games

Edinburgh, Scotland
6.20.22
Lead UI Programmer
More Jobs   

CONNECT WITH US

Register for a
Subscribe to
Follow us

Game Developer Account

Game Developer Newsletter

@gamedevdotcom

Register for a

Game Developer Account

Gain full access to resources (events, white paper, webinars, reports, etc)
Single sign-on to all Informa products

Register
Subscribe to

Game Developer Newsletter

Get daily Game Developer top stories every morning straight into your inbox

Subscribe
Follow us

@gamedevdotcom

Follow us @gamedevdotcom to stay up-to-date with the latest news & insider information about events & more