LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Project Help

Hello everyone,

I am a student and I am making a project with Labview which I need some help with.

My project is about a top view racing game and this is what I have so far: (see attchments)

Now I wanne know how I can get the little car (a little triangle) to move in the way the triangle is pointing. I've tried some options but none of them have worked so far.

My second problem is how do I display my racing track underneath the little car and not above it.

 

Can anyone help me?

 

Thank you in advance.

 

If I wasn't clear enough about something, feel free to ask.

0 Kudos
Message 1 of 2
(2,268 Views)

Hello Binkiwinki,

 

First of all I would like to give you a hint concerning get help from experienced people on the forum.

In general you will get more and better feedback, when you post questions and also explain what you have already tried at your side.

 

The main issues in your code for the moving of the car are the following things:

- You have swapped cosinus with sinus

- You are adding integer with doubles (cos and sinus values) and the forcing them again in integers.
This way you will never be able to do small corners (smaller than 30 degrees) with your car.

You should keep track of your positions in a floating point datatype (like double=orange wires) and add the cosinus and sinus to that internal "variable" (feedback node might be more useful).

Then you can still wire it to your "X-Y position cluster" for the actual showing of the car.

Keep in mind that there are better approaches, but I would like you to start with this.

- You have not documented your code. If you're asking for help, please always document what you're doing in the different places in the VI.

 

Where is your racing track?
I don't see anything included.

 

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 2 of 2
(2,187 Views)