- Home /
Using LookAt with Scriptable Objects
Hello, I'm trying to make an object point towards my player using LookAt and ScriptableObjects and would love some help
Currently, the objects look at the waypoints they travel between using this snippet
public void Move()
{
gameObject.transform.LookAt(waypoints[num].transform.position);
gameObject.transform.position += gameObject.transform.forward * speed * Time.deltaTime;
}
I guess I have to change the (waypoints[num].transform.position);-bit to make it look at an object with scriptable objects and something like transformToSet.Value = gameObject.transform;
Sorry if it makes no sense, and thanks for stopping by
Your answer
Follow this Question
Related Questions
Instancing ScriptableObject not saved in assets results in warning message 0 Answers
Why do I need to serialize a struct inside a ScriptableObject to save its data? 1 Answer
Make the same serialized class as a ScriptableObject? 1 Answer
How to Update ScriptableObject 1 Answer
How can I find all instances of a Scriptable Object in the Project (Editor) 3 Answers