Make objects active when inside Reference object/daemon

Discussions about rigidbody simulation in Realflow 4
TinuZ
Posts: 29
Joined: Tue Mar 06, 2007 1:22 pm
Contact:

Make objects active when inside Reference object/daemon

Postby TinuZ » Wed May 06, 2009 2:31 pm

Anybody has a way to do this, either script, scripted daemon or something else?

all I need is the way a daemon works but for objects and then not on force or velocity but on a attribute, (setParameter("Dyn motion",True)

the only thing I can't find in the doc's is how a daemon determines if something (particle or object) is inside his bounding box or volume...

ideas?


lukeiamyourfather
Posts: 2880
Joined: Mon Oct 15, 2007 4:09 pm
Contact:

Make objects active when inside Reference object/daemon

Postby lukeiamyourfather » Wed May 06, 2009 4:49 pm

Attributes can be changed with Python in an event script or batch script. A textbook kind of example for this.

Code: Select all

cube = scene.getObject("Cube01")

if cube.getPosition().getX() > 5:
     cube.setParameter("Dyn motion", True)

Push F11 to get an event script window and then that would be done on a per frame basis or per step too. Instead of getting the X position of the cube then condition could be whatever you want it to be. Cheers!

TinuZ
Posts: 29
Joined: Tue Mar 06, 2007 1:22 pm
Contact:

Make objects active when inside Reference object/daemon

Postby TinuZ » Thu May 07, 2009 9:54 am

Hi luke,

not really what I meant, I'm poor at explaining, I know... :D

what I need is a way to test if an object A is inside or outside an object B, and if true set the dynamic attr to true or false

actually this was my backup if I couldn't get the equasion to work, where you also responded :D

(http://www.realflowforum.com/view_topic.php?id=4677)


Return to “RF4: Rigidbody simulation”

Who is online

Users browsing this forum: No registered users and 1 guest