Jump to content

SetInput doc not complete


YouGroove
 Share

Recommended Posts

The PlayerFPS code uses two other parameters for SetInput function.

They are not documented on the official doc.

 

 

FPS player code :

--Position camera at correct height and playerPosition
   self.entity:SetInput(self.camRotation.y, playerMovement.z, playerMovement.x, jump , false, 1.0, 0.5, true)

 

 

 

 

Official docs :

 

This functions set the movement parameters of an entity that uses the CharacterPhysics physics mode.

 

The input values should not be modulated by the application speed, since they will only be used once per physics step.

Syntax

  • void SetInput(float angle, float move, float strafe=0, float jump=0, bool crouch=false, float maxaccel=1)

Parameters

  • angle: the angle the character faces.
  • move: the forward movement of the character.
  • strafe: the horizontal movement of the character.
  • jump: the jumping force to apply.
  • crouch: if set to true the character will crouch, otherwise they will stand up.
  • maxaccel: the maximum acceleration the character may use.

Stop toying and make games

Link to comment
Share on other sites

From the header file:

virtual void SetInput(const float angle, const float move, const float strafe=0, const float jump=0, const bool crouch=false, const float maxaccel=1,const float maxdecel=0.5, const bool detailed=false);

 

Granted not all that helpful, but at least "maxdecel" makes some sence

System:

Linux Mint 17 ( = Ubuntu 14.04 with cinnamon desktop ) Ubuntu 14.04, AMD HD 6850, i5 2500k

Link to comment
Share on other sites

  • 6 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...