Change size of collision capsule.

#1
I need to change size of character's (PE_LIVING) collision capsule during the game, not continuously, just one-time change after some action.

I tried to rephysicalize entity or assing new pe_player_dimensions through GetEntity()->GetPhysics()->SetParams(...), but then capsule just disappears.
I also tried to attach to my character simple PE_LIVING entity and then manipulate with it's capsule, but, for some reason, it doesn't recieve collisions from other characters.

So, how it can be done?

Re: Change size of collision capsule.

#2
I think you could just call the GetEntity()->Physicalize(physParams) function again if you want to change some of the parameters. I tried it in the FPS Template and it worked fine, sounds more that your entity setup might be wrong? Maybe you could post some code to see where the issue could come from.

Cheers,
Chaylx

Re: Change size of collision capsule.

#3
Chaylx wrote:I think you could just call the GetEntity()->Physicalize(physParams) function again if you want to change some of the parameters. I tried it in the FPS Template and it worked fine, sounds more that your entity setup might be wrong? Maybe you could post some code to see where the issue could come from.

Cheers,
Chaylx


I have already solved this. My problem was, that when I assigned capsule, it's boundaries passed through the terrain. When I started to assign capsule with "good" size, all went well.
So, it can be done by SetParams() and there is no need to rephysicalize entity.
Last edited by hodirt on Tue Apr 11, 2017 4:11 pm, edited 1 time in total.

Who is online

Users browsing this forum: No registered users and 2 guests