Jump to content

Modifying the collision shape for ThirdPersonControls component


kasool
 Share

Go to solution Solved by Josh,

Recommended Posts

I'm trying to modify the collision shape for the Third person controller I've attached to a crate model I added.

So far in ThirdPersonControls::Start() I've tried adding:

auto model = entity->As<Model>();
auto bounds = model->GetBounds(BOUNDS_LOCAL);
auto collider = CreateBoxCollider(bounds.size, bounds.center);
model->SetCollider(collider);

But this doesn't seem to work. I'm guessing the default collider is the size of the starter robot model?

Link to comment
Share on other sites

The player collision mode ignores any assigned colliders and uses several cylinder shapes to get the desired behavior. It would probably not be difficult to add a command that adjusts the radius and height of the player 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

40 minutes ago, Josh said:

The player collision mode ignores any assigned colliders and uses several cylinder shapes to get the desired behavior. It would probably not be difficult to add a command that adjusts the radius and height of the player shape.

I see, do you mean that as a feature that will be coming from your end or am I doing something wrong? :)

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