I'm trying to access the world position of a point of the object. The command is GetPoint. it woks but not in the deformed space (i.e. the object is in a skin deformer and is moving).
As such, I need the World Position in Deformed Space. The documentation does not provide any parameters for GetPoint
You can check the point operator/node in the expresso for comparison here:
Is there a way around this?
Thank you for looking at the problem.
in the sense of the word, Cinema 4D has no "deformed space". You have objects with caches (basically the polygon representation of the object) and generator and/or modifier/deformer objects, which then add to the cache hierarchy. So in the end, it is a matter of inspecting the cache hierarchy of an object, looking at the cache you are actually interested in (so in your case the Deform Cache created by the Skin Deformer) and getting the point from there.
GetCache() and GetDeformCache() are the functions to look at. Please node the images and code snippets provided there to get a better understanding.
Also the C++ SDK documentation has a manual on BaseObject and its cache.
Thanks for the info @a_block
Just read the documentation and it quickly went pretty complicated.
Anyhow, this code works for me so far
Works also with an additional deformer stacked up (i.e. a skin deformer and a bend deformer).
I'm glad you found something working for you. I just want to mention, this way of using the deform cache directly will only work for very specific setups, for arbitrary object configurations you will most likely need to iterate through the cache. So, I think, it's worth to give those manuals another read.
Also Maxime has posted some snippets in Getting a polygonal version of an animated mesh, which might be useful for you.