playMaker

Author Topic: First person crouching problem  (Read 1774 times)

Moonwall

  • Playmaker Newbie
  • *
  • Posts: 11
First person crouching problem
« on: May 02, 2015, 12:59:30 PM »
Hi!
I have a problem making a full working fps crouching.
I tried to make something like this:
When button "C" is pressed set scale of first person controller to 0.5, and when button "C" is released set scale of first person controller to 1.

Making controller smaller works perfect, but making it bigger again cause some problems - because size is changing from top and bottom, the first person controller starts going through the floor, and it falls through this floor, or "jumping" to get above the floor.

I found a workaround to change Y position of the camera, instead of changing size of the entire controller, but I need player to be able to fit inside the vent I made.

Did anyone managed to find a good working solution how to make crouching?

Thank you!


Digitom

  • Junior Playmaker
  • **
  • Posts: 61
Re: First person crouching problem
« Reply #1 on: May 02, 2015, 07:50:50 PM »
instead of changing the scale of the whole controller, try just scaling the child objects of the controller with the collision objects attached. you would have to move your capsule collider (or whatever collider you are using) to a child object, but it would be a workaround this issue.

You can also experiment with pivot points when using child objects to pick where exactly you want your object to scale from.