Jump to content

  • Log In with Google      Sign In   
  • Create Account

PhysX Detaching Shapes hard to understand


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 noatom   Members   -  Reputation: 785

Like
0Likes
Like

Posted 16 July 2012 - 03:41 PM

Well I got to a topic in the documentation that is pretty hard to understand,it's called Detaching Shapes.I have a sample app,you control a first person camera,and you can throw snowballs.

In the documentation it says: "some of the shapes detach on contact with a snowball".

So,if I have a collision with a snowballs,what is that "detaching" process that is initiated.What does it do?

Sponsor:

#2 NumberXaero   Prime Members   -  Reputation: 1515

Like
1Likes
Like

Posted 16 July 2012 - 07:09 PM

I guess you are referring to the snowman example, where you can hit the snowmans nose with a snowball and the nose falls to the ground.
In that example they build the snowman, and set the nose shapes filter data with a custom detachable flag. In the contact report callback, when nose shape is hit by a snowball (also has a custom flag) the nose shape is saved in a list for detaching. At some other point at the end of the frame, the list of detachables is processed, each nose shape (created initially as part of the compound dynamic snowman?) is recreated as dynamic actor by itself.
The nose material, render model and transform are copied to the new dynamic actor. The dynamic nose is then dropped into the scene with a small force applied while the static nose is deleted.
So the original compound nose shape is detached from the snowman, and copied to a dynamic actor and allowed to move freely in the scene.

What physx version are you using?

Edited by NumberXaero, 16 July 2012 - 07:11 PM.


#3 noatom   Members   -  Reputation: 785

Like
0Likes
Like

Posted 17 July 2012 - 06:41 AM

3.2 and thank you for your answer




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS