'How to set object position at the border of spriterenderer using direction
I have a character (that pink guy) and I want to place an object on him with a given random direction.
Lets say the direction is Vector3.up, the object would be placed at the top-middle of my character.
Vector3 dir = Random.insideUnitCircle.normalized;
_trailMid.transform.position = transform.position + dir + (_jellyVo.SpriteRenderer.bounds.size / 2f);
I've tried many things but none worked. I would like to get some help from you guys!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

