Hey! I posted recently a question about an ActionList error and would like to post in here again because my game is a top-down adventure game and I'm having a big problem making the player turn to mouse position instead of using the natural WASD turn. Is there any way to do this? I had a previous framework I built in Playmaker which doesn't work in here because of the cameras. MousePick only works on Main Camera events, I suppose.
Can someone give me suggestions on how can I do this?
Comments
Under what conditions are you trying to turn the player to the mouse? What is your chosen movement method?
AC has a Character: Face object Action which is used to turn the player to objects in the scene, but the mouse itself doesn't exist as a scene object. It would be very simple to write a custom Action that can be used to turn the player to the mouse's point in 3D space, however.
If you didn't want to go down the scripting route, one sneaky method you could try is to use AC's World Space Cursor Example component. This script demonstrates how a 3D GameObject can be used to override the cursor position, but it can also be used to place a GameObject at the cursor in 3D space. Try attaching it to a cube (with no collider!) in the 3D Demo game and you'll see how it works. You could then try using the Character: Face object Action to make them face the cube - and when it's working simply disable the cube's renderer.