Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Animated objects with origin not in the geometry center have wrong physical location #5074

Open
kimden opened this issue May 6, 2024 · 0 comments

Comments

@kimden
Copy link
Contributor

kimden commented May 6, 2024

Description

Consider a Blender object whose origin is not in its geometrical center (that is, Object > Set Origin > Origin to Geometry changes its origin). When they are animated using movement or rotation, their physical and graphical appearances are not located in the same place.

More precisely, it seems like if $v$ is a vector from the origin to the geometrical center, then physical location can be obtained from the graphical location using movement by vector $v$, and the intended location is graphical location. It feels like the physics animation location modifier is applied relatively to the object, and not to the world.

It probably isn't really noticeable on the maps with objects without rotation, as for them authors tend to just move the origin to the geometrical center and then adjust location animation by a fixed value. But for rotated objects, the origin is also a point around which the object is rotated, and it cannot be solved as easily.

Example (simple arena, cubes with side length 10m, one of cubes is raised up by 20m, kart can go through the cube, same picture happens when they are moved and when they are rotated):

Screenshot from 2024-05-06 22-53-32

Maybe I am not aware of some other method to modify something in Blender and not in the code - those methods I heard about are way too complex to handle a simple rotation. An example of addon with that bug is Emerald Arena version 2 which will be released in May 2024 (you can see many normals for the karts which are standing on the podium, in another place):

Screenshot from 2024-05-06 23-41-18

Steps to reproduce

  1. Make an object whose origin is not a geometrical center (e.g. a cube moved by 1m in edit mode)
  2. Add location/rotation animation
  3. Open STK with physics debug and make sure physical boundaries are not in the same place

Configuration

STK release version: latest git e47958f, happens in many commits before too - I failed to bisect for now due to strange visibility bugs, I'll edit it I manage to.

STK Source (PPA, distribution package, official binary, etc.): github

Blender version used: 2.93

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants