Jump to content

Character Controller height


Brutile
 Share

Recommended Posts

In the SetInput command which is what you will use to move your character controller, there is a crouch setting. I have never used this however.

 

 

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

trindieprod.png?dl=0spacer.png?dl=0steam-icon.png?dl=0twitter-icon.png?dl=0spacer.png?dl=0
Link to comment
Share on other sites

Actual LE3 cylinder is not adjustable and fixed.

The other problem is with bigger characters, as collision will be too small i don't know if some day it will find a fix, that's pretty limited as Unity for example proposes any shape size you want for character controller.

 

Some solution in C++ , use a custom physic shape you made for collision, and calling navmesh functions access to navigation coordinates to manually make move yourself the physic shape.

Stop toying and make games

Link to comment
Share on other sites

I had an idea, now I have to change it

 

Welcome to game programming smile.png

 

 

There are usually a lot of smoke and mirrors in games. There might be a workaround to get this same effect if you describe more your specific situation.

Link to comment
Share on other sites

So, I'm new. Hopefully everyone knows that. I've done virtually no scripting for LE yet. That said.

 

It seems unlikely you couldn't adjust the size/shape of a cylinder by manipulating it's properties. But alas, newbie here. If that's truly the case why not try constructing a new cylinder when you crouch, and apply that to your model as the physics shape? Do the same for standing back up?

 

http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/shape/shapecylinder-r519

Coding for Christ.

Link to comment
Share on other sites

The character controller has a non modifiable cylinder, so you can't replace it as far as lua is concerned. A solution I to manually create your own character controller. I have a feeling more people will end up doing this as they start making games that don't exactly fit in the COD FPS mold, or as they use non human characters.

Link to comment
Share on other sites

However creating your own character controller isn't all that easy. Getting it just right is a pain.

 

Not a pain and should allow lot of possibilities and any custom collision need.

Using simple physic shapes you move by hand and change depending on position (crouch, crawl , stand) should work and will allow any shape for any character/monster/robot size, using navmesh point navigation it should work. Actual LE3 character system is very limited and too much restrictive, if you want better and non limited, like always you will have hard work to do.

  • Upvote 1

Stop toying and make games

Link to comment
Share on other sites

ahhhaha , how do you think other people done in Unity or other engines ?

Unity default character is good to test and prorotype, not so good character controller, once you need a better one, you need to code and in other cases use real physics instead of faked one.

 

What are the details stopping you ?

I would have used a simple capsule physic i would move using SetPhysicsPosition, i would rotate, and i would cancel physics unwanted rotation velocity using SetOmega().

Than crouching or crawling i would just Hide the capsule and show/activate a different physic shape like a smaller capsule for crouch and some horizontal aligned capsule for crawling.

It's only be able to deal with all available physics functions.

Stop toying and make games

Link to comment
Share on other sites

I'm not doing some FPS game right now, there is so much FPS games dry.png

The best way used today i think used in games is a mix of ragdoll physics and animation system, this way any collision limb of character never passes throught floor , or character can pass under low obstacles crawling.

 

Perhaps some objects physics attached to bones and not colliding between them (see pic below)

Otherwise, it's using physics and tricks indeed , you can also google or ask on other forums to see how people manage that. It's only lot of work and lot of tweaking and tricks.

 

Video example :

post-3271-0-24382800-1401663243_thumb.jpg

Stop toying and make games

Link to comment
Share on other sites

  • 1 year later...

Well I don't know if somebody is still interested in this, but I had to work today on this, and I have to say making just a Sphere and add something modified script FPSPlayer.lua with Rigid Body - Prop and Mass=10 work fine. So you get a Shape-Collision just as big as your Sphere is.

 

Had to change the commands function in FPSPlayer.lua and add something with addforce().

 

 

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