Jump to content

Player Controller Crouching


darrenc182
 Share

Recommended Posts

Yes a float for the the new height would be cool, although if this is availabe next thing you will need is to change controller orientation... crouching is not so much an issue, but to make prone realistic you would need to basically rotate the controller mesh by 90degrees to simulate lying down..

 

I know this is growing outside scope but height and orientation would be nice... so for crouch you can set the height, but for prone you can set the height normal but set the rotation to 90... or 1 for 90 degree rotation, I am sure this will create a whole bunch of issues but it was just a suggestion... :D

 

 

I don't know if I would rotate the controller. Instead it would be nice if you could make oval shaped. Then you could change the shape of the controller instead to be long and narrow.

Link to comment
Share on other sites

I don't know if I would rotate the controller. Instead it would be nice if you could make oval shaped. Then you could change the shape of the controller instead to be long and narrow.

 

That would work to, in GDK, using thier controller the problem was you could not change the this, you just had a width...

 

From the way it is working based on wiki, It would appear that Josh is actually creating 2 controllers of different heights... that switch on the updatecontrol "crouch" option setting...

 

Given this scheme, it would be very helpful if we had 3 height options...

i.e...

Controller::Controller( flt height, flt radius=0.4f, flt stepheight=0.5f, flt maxslope=45, flt height1=0, flt height2=0 )

 

void Controller::Update( flt angle, flt move, flt strafe = 0.0f, flt jump = 0.0f, flt maxacceleration = 0.5f, int iterations=1, int heightmode=0 )

Were heightmode can be 0 (height),1 (height1) or 2 (height)...

 

Then instead of the

int ControllerCrouched( TController controller )

 

Have this:-

 

int ControllerHeightMode( TController controller )

Which returns a 0,1 or 2 depending upon which mode is currently active..

 

I do not mean to say what has been done is not very helpful, but I believe that having 3 possible heights would be workable for any application...

 

Ideally, having the ability to set the heigth,width and depth for the 3 modes would be perfert for creating realistic FPS character cotrollers..

If it's not Tactical realism then you are just playing..

Link to comment
Share on other sites

A 90 degrees rotated controller is also not optimal for prone stance, it should be more like 1/4 long oval cylinder, which is only 1/8 height of the original controller.

 

In prone stance you can still turn around in narrow tunnels, but you need about 1/4 of your body height room for that in either X or Y dimension.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

In order to satisfy everyone it's going to need to be extensible. Something like leaving CreateController like it is now, but adding a AddControllerStance(controller, Vec3 size) function that will allow you to define a size for that stance. It would return an integer index. You could then call something like SetControllerStance(3) to set the controller size/shape to whatever index 3 was.

 

Anybody see any drawbacks to this approach?

Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX

ZBrush - Blender

Link to comment
Share on other sites

Less in the long run because we could then support our own arbitrary requests for controller shapes/sizes instead of asking him to add support for making a controller bigger when we eat the magic mushroom, this pill makes me smaller, cute little mexican midgets, etc...

Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX

ZBrush - Blender

Link to comment
Share on other sites

The primary challenge with a prone stance is collision detection to tell if the player is able to go prone. An elongated shape may also cause unforeseen problems since the controller code has until now used a cylindrical shape.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

  • 6 months later...

Okay, crouching is great, but what about laying position?

Can it be added some addition scaling for crouching position?

 

For example, when player stand, its size is 1,1,3.

When player is crouching, its size is 1.2, 1, 1.5 (because sitting person in X axis takes more space then stading)

When player is laying, its size is 2.5, 1, 0.5 (leg is laying on the ground)

Working on LeaFAQ :)

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