Jetro
Member
|
Direction
how to make sure that the character was directed toward the cursor like a Top Down Shooter?
(This post was last modified: 05-01-2011 05:57 AM by Jetro.)
|
|
05-01-2011 05:57 AM |
|
Driklyn
Member
|
RE: Direction
Like in "EsenthelEngineSDK\Tutorials\Source\Advanced\4 - Demos, Game Basics\Game Basics\07 - Doors.cpp" ?
(This post was last modified: 05-01-2011 06:26 AM by Driklyn.)
|
|
05-01-2011 06:25 AM |
|
Jetro
Member
|
RE: Direction
In this example, the character goes in the direction of the cursor and I need to, he just turned in the direction of the cursor.
|
|
05-01-2011 06:52 AM |
|
Dampire
Member
|
RE: Direction
Code:
Flt angle_delta = AngleDelta(Chrs[0].angle.x+PI_2, Angle(phys_hit.plane.pos.xz() - Chrs[0].pos().xz())),
max_frame_delta=Time.d()*DegToRad(600);
Clamp(angle_delta, -max_frame_delta, max_frame_delta);
Chrs[0].angle.x += angle_delta;
|
|
05-01-2011 08:02 AM |
|
Jetro
Member
|
RE: Direction
Thank You!!!
|
|
05-01-2011 10:04 AM |
|