[Tickets] [Orxonox] #286: WorldEntity scaling with physics

Orxonox trac at orxonox.net
Mon May 2 23:21:03 CEST 2011


#286: WorldEntity scaling with physics
-------------------------+--------------------------------------------------
 Reporter:  rgrieder     |       Owner:                              
     Type:  defect       |      Status:  new                         
 Priority:  high         |   Milestone:  Version 0.3 Codename: Castor
Component:  Physics/ODE  |     Version:  0.2.0                       
 Severity:  normal       |    Keywords:                              
-------------------------+--------------------------------------------------
Description changed by rgrieder:

Old description:

> When using physics, it is not possible to scale an object at the moment.
> The problem is that the Bullet physics engine doesn't support that kind
> of transformation natively.
> The main reason is that the collision shapes have fixed size. You create
> a sphere with radius 5 and will have that radius as long as its lifetime.
>
> But: You can apply setLocalScaling() to every collision shape. The
> implementation however is not complete. For instance for compound
> collision shapes, it has no effect. That inevitable means that we need to
> do some heavy work ourself.
> Imagine you want to scale a compound collision shape: You will have to
> scale each and every shape itself and even adjust the transformation.
>
> There is more problems: SphereCollisionShape obviously does not support
> non-uniform scaling (or it won't be a sphere anymore). You will have to
> check every bullet collision shapes for its scaling capabilities and
> implement that in our framework. This can unfortunately only be done by
> examining the Bullet source code.

New description:

 When using physics, it is not possible to scale an object at the moment.
 The problem is that the Bullet physics engine doesn't support that kind of
 transformation natively.
 The main reason is that the collision shapes have fixed size. You create a
 sphere with radius 5 and it will have that radius as long as its lifetime.

 But: You can apply setLocalScaling() to every collision shape. The
 implementation however is not complete. For instance for compound
 collision shapes, it has no effect. That inevitably means that we need to
 do some heavy work ourself.
 Imagine you want to scale a compound collision shape: You will have to
 scale each and every shape itself and even adjust the transformation.

 There is more problems: SphereCollisionShape obviously does not support
 non-uniform scaling (or it won't be a sphere anymore). You will have to
 check every bullet collision shapes for its scaling capabilities and
 implement that in our framework. This can unfortunately only be done by
 examining the Bullet source code.

 '''Update:'''
 I checked Bullet v2.77 (update is in the trunk since 04/27/11) and it
 seems to have scaling for compound collision shapes now. But haven't
 checked with the others.
 In short: our task may have gotten much easier!

--

-- 
Ticket URL: <www.orxonox.net/ticket/286#comment:3>
Orxonox <http://www.orxonox.net>
Orxonox Open Source game



More information about the Tickets mailing list