Tag Info

New answers tagged

3

You need to set to NPC a new target once in a while (e.g. each 5sec) and move it towards the target each tick little by little. Then it will be smooth. To avoid sharp turns upon setting a new target, you can mix target positions between old and new target for a second or two. Additionally, you might want to Google for "Steering behavior"


0

I would switch from having a function that adds stats to a function that takes in the entity with the equipment or buffs and make the item responsible for modifying the entity. Something like... Character::Actualize() { this->bonusstats.reset(); for /*iterate through vector of buffs and equipped items*/ { item->applyEffect(this); // ...



Top 50 recent answers are included