Greetings,
I'm currently working on a game project with WCK and wondered if anyone had insight into how I might be able to change/toggle my character's collision shape during certain states of the character's animation. I have a tall rectangle for the character normally, but when the character jumps, the character takes up less space vertically speaking. I'd like to reflect that change in the visual appearance in Box2d as closely as is reasonably possible. The character, as of now, has the same tall collision and it looks a bit weird when the character misses platforms due to the collision being lower than is reflected in the character animation.
I've tinkered around a bit and tried a few things, but I'm mostly stabbing in the dark trying to find the right combination of function calls to set up a different shape at runtime.
The last thing I've thought about doing is getting the information during PRE_SOLVE and trying to compare the overlap there and make particular exceptions based on what the character is doing. I'm worried about the accuracy of this with respect to custom shapes that undulate a bit.
Thank you very much for the help. Hopefully I can share a bit with some of the things I'm working on as I continue to use this engine over the next 4 months on the project I'm on.
-Burton
I'm currently working on a game project with WCK and wondered if anyone had insight into how I might be able to change/toggle my character's collision shape during certain states of the character's animation. I have a tall rectangle for the character normally, but when the character jumps, the character takes up less space vertically speaking. I'd like to reflect that change in the visual appearance in Box2d as closely as is reasonably possible. The character, as of now, has the same tall collision and it looks a bit weird when the character misses platforms due to the collision being lower than is reflected in the character animation.
I've tinkered around a bit and tried a few things, but I'm mostly stabbing in the dark trying to find the right combination of function calls to set up a different shape at runtime.
The last thing I've thought about doing is getting the information during PRE_SOLVE and trying to compare the overlap there and make particular exceptions based on what the character is doing. I'm worried about the accuracy of this with respect to custom shapes that undulate a bit.
Thank you very much for the help. Hopefully I can share a bit with some of the things I'm working on as I continue to use this engine over the next 4 months on the project I'm on.
-Burton