Announcement

Collapse
No announcement yet.

Diablo3 like custom character controller. Problem with proper pawn rotation and movement.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Diablo3 like custom character controller. Problem with proper pawn rotation and movement.

    Hi guys

    Desired result:
    When we release LMB character should move to point where cursor was in the moment when we release LMB.

    I set rotation for capsule right after LMB release, by taking Hit Results Under Cursor - location, and also set desired rotation for capsule. And after make some add rotation and offset. and move pawn till current location equal to target location.
    The problem what if we will move mouse cursor too fast (not really fast in fact), character will miss target point because of (?) rotation and/or target are slightly different, and pawn will move forever cause vector equal never will give true.

    Im not really understand where exactly error are happen?

    upd: as i expect, problem was solver by calculating desired capsule rotation after LMB released each tick (previously desired rotation was calculated and setted once after LMB release, not its calculated and add rotation every tick, despite what we dont really need that cause after LMB release character doesnt rotate to mouse position like in DIablo3 and similar games). But it still doesnt give me the answer.



    Last edited by Alexander.L; 08-09-2019, 07:42 PM.
Working...
X