Forum rules - please read before posting.

Turn to Face / Auto Aim

I'm working on a classic style survival horror game - complete with tank controls and fixed cameras. I'm wondering if the Spherecast actions we now have would help in creating a simple auto-aim feature like in early Resident Evil?

Basically, it can be broken down to three stages:
1. Check if an enemy is detected when the aim input is pressed
2. If there is, check which one is closest
3. Run the Player: Turn to Face action

I really don't know how to go about it though. At first I thought about just using triggers, but of course that's no good because triggers wouldn't take into account whether there is a collider between the player and enemy (or which is closest).

Comments

  • For something more exact, you may want to rely on scripting - but I'd say it's worth giving a go using Actions.

    When aiming, you can run the Physics: Raycast Action to shoot a ray/sphere from e.g. the centre of the Player, in the direction they face. If your ActionList has a GameObject parameter, you can assign that in the Action to have it be assigned to the first-found result.

    You can then follow this up with a Character: Turn to face Action, passing in this parameter as the object to face.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.