Closed guoguoguilai closed 5 years ago
AgentAction() is where you get the action from the model and instruct your own agent to do the corresponding thing. If your agent is controlled by VR controller, you don't need to override the AgentAction(), you should create your own playerbrain asset and map your action in there.
AgentAction() is where you get the action from the model and instruct your own agent to do the corresponding thing. If your agent is controlled by VR controller, you don't need to override the AgentAction(), you should create your own playerbrain asset and map your action in there.
Thank you for your reply. I have two questions about this:
@guoguoguilai
@xiaomaogy I am sorry about disturbing you so mush. I am still confused about how to override AgentAction() and map the key in PlayerBrain.
Hi @guoguoguilai
Sorry what I said earlier was confusing. I meant that you don't need to override the AgentAction() separately for your PlayerBrain. You do need to implement your own AgentAction() logic, which maps a certain action output from a model (or from a VR controller) to a certain actual action(like a force applied on a certain direction).
I'm not familiar with the VR input signal, I guess you can do something like: press a key, then change the position of a certain gameobject in a certain direction?
@xiaomaogy I guess VR input signal is kind like the mouse movement. But I don't know how to map this. I already find how to map VRcontroller keys, but I cannot find the controller movement in unity docs. https://docs.unity3d.com/Manual/OpenVRControllers.html. I am still looking for solution...
Thanks for the comments - closing this issue due to inactivity. Feel free to open a new issue if you're still running into problems.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
I want to train a agent to play tennis using imitation learning in a VR game. Another toolkit I use is VRTK. I wonder how to override AgentAction() since the position and rotation of the rack are control by the VR controler. Can someone give me a hint?