Jump to content

VEX: import() pulling in the wrong values


Adam Ferestad

Recommended Posts

I am writing a simulation for a school project, and for some reason, one of my nodes is importing the wrong values for attributes from the points.  

    import("north", north,0);
    import("south",south,0);
    import("east",east,0);
    import("west",west,0);

All of the attributes are correct on the points, but they are not being imported correctly.  I have several other attributes being imported at the same time, and they all are coming in right, just not these 4.  I output the values for north, south, east, and west, and they are coming in as true for north on all of them all the time, then false for all other directions.  This is definitely not the case, since they are being pulled from other geometry and change as the simulation progresses.  It is getting really annoying to have this problem, so if anyone can help me figure it out... please please please help.

 

Edit: Note: the problem is in the code for the turn behavior.

car-behaviors.otl

Development.hipnc

Edited by Adam Ferestad
Link to comment
Share on other sites

your north, south, east, west are float attributes and you are importing them to int variables, so houdini wants to read int attribute which it doesn't  find so you will end up with garbage values

 

just change your north, south, east, west attributes type to int when defining them

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...