playMaker

Author Topic: A to B direction to get there without rotating character?  (Read 988 times)

VanHacks

  • Playmaker Newbie
  • *
  • Posts: 1
A to B direction to get there without rotating character?
« on: March 16, 2019, 01:11:28 AM »
Hello,
I have a soldier using Character Controller in 3D game.

Let's say, he is keeping his eyes on enemies or aiming a gun towards them, but found a magazine on his 2'o clock.
He wants to grab it, but it's little bit too far to reach his hand.
He will move closer, but don't wanna change his looking direction of the enemy.
Therefore, he decided to move to grab it without changing his looking direction.

In short, I don't want character rotate to the object to get there when it's like only 2 feets away. I'm looking for the way the character to step forward to it without rotating character's body toward it. (could handle it with animation if I could get local direction to it).

SO, I'm trying to use Controller Simple Move, but it need move vector from the character.

How does playmaker gets [MoveVector from a character's LocalRotation to a target object's WorldPosition]?
« Last Edit: March 16, 2019, 01:14:28 AM by VanHacks »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: A to B direction to get there without rotating character?
« Reply #1 on: March 18, 2019, 04:57:17 AM »
Hi.
I would suggest to build your own Character controls.

For movement you can use get axis. then you can use that to set velocity or add force.

Mouse Look you can use for the character to look a direction and also rotate to that direction.

When locking to a target you could disable mouse look and use look towards so that player looks to the target.

Character Controller is limited, and mostly used for quick prototyping