Sign in to follow this  
meherzad

how to get a value at runtime

Recommended Posts

I am making a game in c sharp XNA. i want to get a value at the runtime that is the player's position in the form of vector. how will i do that. plus i have an xyz plane value .how will i convert it to an integer value.

Share this post


Link to post
Share on other sites
If you want the position of the player, you need to keep up with that in your code... there is no intrinsic "player position" in XNA.

I'm not sure what you are talking, regarding the integer/plane question.

Share this post


Link to post
Share on other sites
and the second question is

that i have an xyz plane. i want to compare its value to an integer or apply ">" operator on it. how will i do it.

Share this post


Link to post
Share on other sites
Quote:
Original post by meherzad
and the second question is that i have an xyz plane. i want to compare its value to an integer or apply ">" operator on it. how will i do it.
What does comparing a plane with an integer mean?? When is an integer greater than a plane? Is an apple less than an orange?

Share this post


Link to post
Share on other sites
Quote:
Original post by meherzad
I am making a game in c sharp XNA. i want to get a value at the runtime that is the player's position in the form of vector. how will i do that.


This isn't something you read, this is something you set.

Quote:

i have an xyz plane value .how will i convert it to an integer value.


I'm more curious about what problem you believe this is a solution to - maybe we can find a method that makes sense.

Share this post


Link to post
Share on other sites
Quote:
Original post by meherzad
and the second question is

that i have an xyz plane. i want to compare its value to an integer or apply ">" operator on it. how will i do it.


Planes cannot be "ordered", because they can (and in fact, almost always do) intersect (meaning that you can't meaningfully say one is "less than" the other). Why do you want to do this comparison? What do you think it will help you do?

Share this post


Link to post
Share on other sites
My guess is that he wants to calculate the closest/perpendicular distance to the plane from the player's position. (So he can make test like if(dist < 0) { /*position is under ground */ }.

And I guess he means scalar and not integer..

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

Sign in to follow this