I want to scale the PxBoxController (the Z part of it) to make a collision when the PxController is holding special items. These items could scale when he is holding it, (x, y, z) which the max scale is the double of the actual scale of that item.
While the PxBoxController is “holding” the item, the collision of this item is disabled so there is no undesired response for it.
Why do I need to scale the PxBoxController?:
Thus I´m holding an item, I want collision with all other objects including the TriMesh of the level.
Before I can pick up an item, I check with an overlap(…) the looking direction of the PxBoxController and decide if I have enough space to pick an special item up.
(To prevent that objects are picked up inside the TriMesh (or going to overlap))
The special item is lets say, 2 units from the looking direction away thus the original PxBoxController - shape isnt touching it yet.
So when I picked up this item, the shape is going to scale to the Z looking direction, so the
special item is going inside the PxBoxController (but collisions are disable for this item).
The problem is that the PxBoxController scales from the center - not from a fixed point to the scale of the desired axis.
I dont know how I should explain it better, so this pic shows what I mean:
I know I have to dig in the PxController extension code, but I dont want to study this whole project to know how it works.
So is there a simple and fast method to resize the PxBoxController from “a fixed point” to a new scale?
I tried it with the PxActor from the PxContoller underhood, but after moving its “center” position, the sweeps from the PxController (not my sweeps) arent working correct. (Of course)
I guess there is no easy way to handle it, its only reachable via altering the PxController extension code.