Look Direction

Velcer

Member
I have a character that is looking in a direction based on the camera, I have another dummy character that is looking straight ahead. I want to somehow make this dummy character have the same look direction as the first character.

I know how to retrieve the look direction for the first character, but I have been completely unable to find how I might set the look direction for my dummy character.
Note that the dummy character is an AI agent.

I tried accessing the LocalLookSource script, but that's all get, private sets .. upon reviewing the code, it appears to not actually set it. I don't know what actually sets the look direction of a character, but if someone could point me in the right direction, that would be awesome!
 
As you saw, the look direction is determined by the ILookSource interface. The look direction is set by the LookDirection method within the LocalLookSource and it always looks in the forward direction unless there is a target. I think that you're working on a networking implementation, correct? If so you'll need to create your own ILookSource component for that network implementation which is sent by the local player to all of the remote players.
 
Top