Hello there,
I have a question that needs an answer in two different aspects.
The story: I have a physics body (character) that user moves along x axis. There are crates (also physics bodies) falling from sky at random x points. When the main body picks up the crates (thus collides), I want the crates to stick to the character. User will also be able to throw the crates away by swiping.
So by my very limited knowledge and relentless searching, I have two schools of thought here:
-
When the two objects collide (which I have succeeded in detecting) we can make the crate static, and somehow stick it to character, and make it dynamic again when we detect a swipe.
-
When the two objects collide, we can create a simple joint between them, not disturbing the physics at all, which looks the more logical way.
And my question is:
How the hell do I do that?
If we go with the first way, I need to set crate’s x to characters x every frame, and stop doing that once I detect a swipe. How can I do that?
If we go with the latter, I kindly ask a noob tutorial for this as my brain literally hurts when I read it in the api reference. I am, of course, wide open to suggestions.
Thank you very much,
Kaan.
[import]uid: 99031 topic_id: 30192 reply_id: 330192[/import]
[import]uid: 52491 topic_id: 30192 reply_id: 120972[/import]