検索 - User list
Full Version: HDK sim object persistence?
Root » Technical Discussion » HDK sim object persistence?
stkeg
if i create a custom sim solver and it has an object, it doesn't live for the life of the sim.

whenever the next frame occurs, the sim solver is destroyed and re-initialized, destroying any information i stored in my object.

for example, if i create a custom object, say for example my_rigidBody. then i set variables in my object, say mass and velocity. on the next frame, the object my_rigidBody is reinitialized and has a new address in memory. when this happens all of those variables in the object are reset.

i've been looking around more and it seems like i need to use UT_SharedPtr. but i haven't gotten this to work yet. still re initializing my object in between frames.

what is the way to keep objects persistent for the sim?
stkeg
wondering if someone might have some ideas or feedback on this.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB