Thursday, September 30, 2021

Interesting extend Algorthim A*





 https://www.redblobgames.com/

Circular Obstacle Pathfinding

https://redblobgames.github.io/circular-obstacle-pathfinding/

How to find an end point of an arc given another end point, radius, and arc direction?

https://math.stackexchange.com/questions/275201/how-to-find-an-end-point-of-an-arc-given-another-end-point-radius-and-arc-dire


Calculate the length of the arc

https://www.dummies.com/education/math/geometry/how-to-determine-the-length-of-an-arc-2/



http://paulbourke.net/geometry/pointlineplane/


http://paulbourke.net/geometry/circlesphere/

Wednesday, September 15, 2021

Event Declaration

 https://stackoverflow.com/.../how-to-use-c-sharp-events...

Class containing events:
public class EventContainer : MonoBehaviour
{
public event Action<string> OnShow;
public event Action<string,float> OnHide;
public event Action<float> OnClose;
void Show()
{
Debug.Log("Time to fire OnShow event");
if(OnShow != null)
{
OnShow("This string will be received by listener as arg");
}
}
void Hide()
{
Debug.Log("Time to fire OnHide event");
if(OnHide != null)
{
OnHide ("This string will be received by listener as arg", Time.time);
}
}
void Close()
{
Debug.Log("Time to fire OnClose event");
if(OnClose!= null)
{
OnClose(Time.time); // passing float value.
}
}
}
Class which handles events of EventContainer class:
public class Listener : MonoBehaviour
{
public EventContainer containor; // may assign from inspector
void Awake()
{
containor.OnShow += Containor_OnShow;
containor.OnHide += Containor_OnHide;
containor.OnClose += Containor_OnClose;
}
void Containor_OnShow (string obj)
{
Debug.Log("Args from Show : " + obj);
}
void Containor_OnHide (string arg1, float arg2)
{
Debug.Log("Args from Hide : " + arg1);
Debug.Log("Container's Hide called at " + arg2);
}
void Containor_OnClose (float obj)
{
Debug.Log("Container Closed called at : " + obj);
}
}

Sunday, September 12, 2021

Animation Instancing

 https://blog.unity.com/technology/animation-instancing-instancing-for-skinnedmeshrenderer




https://www.youtube.com/watch?v=_GGVlzAcWgA