Jump to content

Deconstructing SetInput


wadaltmon
 Share

Recommended Posts

The SetInput function interests me, as it seems like it has a lot rolled into it that allows it to take the place of many lines of code, but doesn't block other functions from working in tandem with it. There are a few functions that it overrules (as stated in the documentation), but it provides acceleration, velocity, and rotation for a character while seemingly also overriding the default physics behaviors associated with force applied to a Model or Entity with a given collider applied. On that note, it also seems that it doesn't give you a maximum velocity; for if I use the SetInput function but also apply an extra force in a given direction, I can give that object a boost for a short time before the force dissipates.

Anyone know of the equivalent code for SetInput? It seems to go beyond just AddForce(), SetRotation(), and/or SetVelocity(). Is it maybe a Move() function with some math to determine things like acceleration?

Link to comment
Share on other sites

 

7 hours ago, JMK said:

No, the player controller does not use the same physics as normal rigid bodies.

And this becomes the case just by setting the physics mode to Entity::CharacterPhysics (2) and the collision mode to Collision::Character (3)? It continues even when using a different collider than the default?

Link to comment
Share on other sites

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...