Making actors move towards the nearest instance of an actor tag
BenCart
Member Posts: 4
I can't seem to find a way for an actor to move towards the nearest instance of a particular actor tag. Any suggestions?
Comments
You're talking about homing missiles, amirite?
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
HOWEVER
Given that no two actors are ever spawned or destroyed you could try this:
In the scene space declare an actor and override the prototype. Then in that single Scene Controller instance create a VERY complex mapping between every single actor and it's "missile" counterpart. The scene controller would do the calculations and then inform the individual "missile" where to fly.
It's messy...
and again, this ONLY works if the total number of actors and the total number of missiles is known at design time.
your solution is good, but without the ability to bind two objects together it gets cumbersome FAST!
I like your thinking though
Unfortunately, I don't. I could constrain the number but it will be in the high double figures for the scope of the game. Looks like I have to bite the bullet and just code this (which unfortunately means the designers have to go through me to make changes). Thanks for the replies.
Unfortunately...I don't have time to work out the details. I'm sure you can work out a clever solution in time.
Welcome to game development! It's not that easy...but GS sure helps things!