supertuxkart / stk-code

The code base of supertuxkart
Other
4.54k stars 1.06k forks source link

Incorrect positionning of movables inside rotated library objects #2345

Closed JulianSchoenbaechler closed 9 years ago

JulianSchoenbaechler commented 9 years ago

Maybe a little bit difficult to explain, theres a test-case attached.

When replacing objects in a library node through the collision trigger, they appear not correctly rotated on the track.

I made a small test track (it's a battlemap named 'Test') and a simple library object (the ugly brick thing -> 'stklib_rotationBug_a'). I placed the linked object with a rotation of z:-90° on the track. When driving into it -> the "slivers" appear differntly rotated.

Get the files here: https://app.box.com/s/4962er5voys9zx7f0ubuqht8h7u2okwh

auriamg commented 9 years ago

This is actually unrelated to scripting, this seems to be an incorrect handling of movables inside rotated library objects (tentive diagnostic : each movable in the rotated library object has the proper rotation but not the proper coordinate)

auriamg commented 9 years ago

Potential fix committed, I'm just not sure I understand what exactly is going on, should be investigated

JulianSchoenbaechler commented 9 years ago

Looks fine to me. Is working well, tested with multiple library nodes.

auriamg commented 9 years ago

Closing as fix. I don't like not understanding why the fix works but oh well