Page 1 of 1

actions

Posted: Mon Apr 05, 2004 9:27 pm
by Coolkat
in Irrlicht you have actions like

EKA_MOVE_FORWARD
EKA_MOVE_BACKWARD

etc.

if you were making a FPS game, how would you do jumping or crouching? since there is no

EKA_JUMP
EKA_CROUCH

is this just not a capablitity or would you have to do this manually?

Posted: Mon Apr 05, 2004 10:40 pm
by schick
Those action keys were implemented for the fps camera scenenode, i think. If you want to write a fps game (there is need of much more actions as you said jumb, crouch, swim and whatever) you will have to implement it yourself. But that should not be a big deal.

Posted: Mon Apr 05, 2004 10:48 pm
by Coolkat
how would i go about implimenting something like that? im sure i could write it if i knew how the engine worked.. but it seems like it's defined in an ENUM.. i could add it but it wouldn't do much..

Posted: Mon Apr 05, 2004 11:34 pm
by schick
Do you want to have something like a state machine?
Or do you want the model (md2 or whatever) to crouch?

Posted: Tue Apr 06, 2004 12:36 am
by Coolkat
errr... i want the model to crouch so when im doing multiplayer mode the others see the model crouch.. but since when you are playing you don't see the model.. i want the camera to go down so it can fit threw small areas.. and also the model can jump so it moves into higher areas.

Posted: Tue Apr 06, 2004 1:31 am
by Domarius
All things in a game need to be tested for collision. The player is no different (if you want to be able to walk up stairs, etc)

So you need to change the size of the player's collision box, sphere, cylinder, whatever you're using, to make it smaller when they are 'crouching'.

If you are using the built in FPS collision and movement for Irrlicht, you need to find the setting that lets you modify the player collision size.

The other thing to do would be move the camera down.