Jump to content

View more

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

PhysX Detaching Shapes hard to understand

4: Adsense

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   

925
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?

#2 NumberXaero   Prime Members   

2606
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   

925
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.