Jump to content
Gelle

Help! to vex

Recommended Posts

hey

i have a vex there turns the color of RBD object in to red on impact.

but here comes my problem, i can't find a way to turn it green one frame after the object have turn to red.

anyone there can help me with that.

 

and here is the vex i am using.

if (@hit_total == 0)
{
@Cd = set(0.10,0.0275 ,0);
    }


else
{
@Cd = set((@hit_total+@id+5), 0, 0);
    }

 

 

Edited by Gelle

Share this post


Link to post
Share on other sites

Can't you just simplify this like shown below? I assume you already set the color of the objects to red before starting the simulation and you just want to change it when they hit the floor. 

if(@hit_total > 0) {

@Cd = set(0,1,0);

}

 

Let me know if it works. Can't test this as I'm not behind my Houdini desk.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×