stride3d / stride3d/stride

Convex physics shapes do not scale along with the model when the model is scaled

Open
#480 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-Physics bug
Dominant language
C#
Stars
7.8k
Forks
1.2k
Avg merge
2d 17h
Merged PRs (30d)
49

Description

Release Type: Official Release

Version: 3.1.0.1-beta02-0615

Platform(s): Windows 10

Describe the bug
When adding a convex physics shape (asset collider) to a model in a scene, and the model is scaled, the collider doesn't scale along with it. This is both game studio as well as in runtime. Using the Physics gizmo option you can see this quite well. The primitive colliders shapes do scale along with the model.

To Reproduce
Steps to reproduce the behavior:

  1. Create box model

  2. Create convex physics shape out of box model

  3. attach static collider or rigidbody colider

  4. Select the generated colider hull for the box as the collision shape

  5. Scale the box model.

  6. Notice how in the edutor, the model scales, but the physics shape does not.

Expected behavior
Just like with the primitive shapes, I would expect the colliders to be scaled with the model. Both in game studio.

Screenshots
Click the gif if it doesn't play automatically:
convex hull scaling

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue in Game Studio and runtime with a model, generated convex physics shape, and scaled model; compare the result with a primitive collider. Trace the convex collider's scale handling from the selected collision shape and verify that the hull follows the model scale in both editor and runtime.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.