Jump to content
GergelyP

can't select @P.y with point function

Recommended Posts

Hey guys,

So today I tried getting a point's .y position but it gives a value of 0 for some reason. In the attached picture you can see the code that I tried to run. When I use the "P" then it gives the correct vector for the position, but when I want to just get the .Y value(should be something around 1), it stopped working. Is it because I can't use the "P.y" expression in the point function?

PointFuctionProblem.png

Share this post


Link to post
Share on other sites

You can do 

vector h = point(1, "P", @ptnum);

f@height = h.y;

or with opinput

f@height = v@opinput1_P.y;

 

Share this post


Link to post
Share on other sites

Yes, you can't use subscript as attribute name, you have to do it after you read the proper attribute type. In this case vector, and then access the Y component.

Share this post


Link to post
Share on other sites
3 hours ago, Sepu said:

You can do 


vector h = point(1, "P", @ptnum);

f@height = h.y;

or with opinput


f@height = v@opinput1_P.y;

 

Thank you, I figured out the first option, I was just wondering if there was a way to access it directly.

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

×