Hi,
I’m completely new to programing and unity so please excuse my lack of jargon or knowledge.
I’m looking to write a program that will emulate the input of a keyboard to command a (for example) vehicle whithin unity across a terrain to a target point. If it reaches the target or fails to reach the target (rolls onto its roof) then it outputs the result and the whole thing resets and starts again.
Is this possible?
Thanks in advance.
It’s definitely possible. There are multiple ways different programs (or devices, if you don’t want the Unity and the external application running on the same system) can talk to each other. One of the best documented ones is simply communication over network protocols, which is of course also possible between programs running on the same system. There’s others too that I’m not familiar with personally - you can Google those just as readily as I could.
However, if you’re completely new to programming, this is a very daunting start. You would do well with a bit less of an ambitious first project.
Hi Thomas, thank you for replying so quickly.
That’s good news. Ive had a look at some youtube videos about setting up the physics side of things and I’m happy that I can build the meshes i need etc. And I have in my head how I want the input and output program to function (more than likely i’ll do that in python… doesnt seem too hard) its just getting them to talk to each other that i dont know where to start with.
Im happy to have the program run on my PC or from something like a Raspberry pi depending which connection is easier (on the PC if there’s no difference). Im happy to put the time and effort into working this out… im assuming its through the transport layer API?
You would either use TCP or UTP sockets to communicate using network protocols - it doesn’t really make much of a difference code-wise. If you were to use a Raspberry Pi, you could also use serial communication, which is easier to set up. I don’t doubt you will find many tutorials on having Unity and a Pi comunicate.
1 Like