Otolone
Member
|
How to raise and lower weapon in an FPS.
Hi there!
I am developing an FPS.
I want my character to raise and lower his weapon and maintain that position while walking or running.
Let me give you my attempt at the problem
Code:
class Player: Game.Chr
{
bool update()
{
input.turn.y=Kb.b(KB_T)-Kb.b(KB_G); // replace the default animation here with Player
// player raising or lowering the weapon
// below is my attempt at the solution I tried to replace the default animation in SkelAnimCache,sac with my animation.
sac.turn_y = skel.getSkelAnim("anim raise/lower weapon");
//unfortunately there is no sac.turn_y in the sac.
return true;
}
// Is there any better way to do this?
}
Thanks in advance!
|
|
04-28-2021 02:44 AM |
|