1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

Generic unity plugin

Discussion in 'SimTools Plugins' started by narthur157, Dec 16, 2015.

  1. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,133
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    47,913Coins
    Ratings:
    +5,027 / 16 / -0
    @kjjcard,
    You don't need to use any of SimTools DLL's.
    You can make a game plugin here.
    https://www.xsimulator.net/communit...ugin-for-simtools-2-0-api-documentation.9107/
    yobuddy
  2. Claudio Silva

    Claudio Silva New Member

    Joined:
    Jun 5, 2017
    Messages:
    6
    Location:
    Brazil
    Balance:
    181Coins
    Ratings:
    +8 / 0 / -0
    My Motion Simulator:
    2DOF
    thanks
  3. Claudio Silva

    Claudio Silva New Member

    Joined:
    Jun 5, 2017
    Messages:
    6
    Location:
    Brazil
    Balance:
    181Coins
    Ratings:
    +8 / 0 / -0
    My Motion Simulator:
    2DOF
    Hello people! help from you was of great importance! below I leave my repository, where you can find the functional code to create the plugin simtools 2, Unreal Engine 4 and Unity3d. There is also a small udp server for viewing data submissions.
    https://github.com/ddkclaudio/QuplaySimTools
    • Like Like x 4
    • Winner Winner x 1
  4. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,133
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    47,913Coins
    Ratings:
    +5,027 / 16 / -0
    @Claudio Silva
    Excellent Work !!
    I'm sure people will be interested in this!
    Thanks buddy!
    yobuddy
    • Agree Agree x 2
    • Funny Funny x 1
  5. ferslash

    ferslash Active Member

    Joined:
    Feb 8, 2011
    Messages:
    495
    Balance:
    4,798Coins
    Ratings:
    +180 / 2 / -0
    is it fully fuctional right now?
  6. Claudio Silva

    Claudio Silva New Member

    Joined:
    Jun 5, 2017
    Messages:
    6
    Location:
    Brazil
    Balance:
    181Coins
    Ratings:
    +8 / 0 / -0
    My Motion Simulator:
    2DOF
    yes
    • Winner Winner x 2
    • Like Like x 1
  7. Spacebar

    Spacebar New Member

    Joined:
    Dec 15, 2017
    Messages:
    19
    Location:
    United States
    Balance:
    271Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    3DOF, 6DOF
    Fantastic! Looking forward to trying it out. Do you have a rig? I still don't. It's a bit daunting when you go through the build forums. I do have a lot of game dev experience.... @anybody wanting to develop content that has a 6dof rig let me know.
  8. Strider

    Strider New Member

    Joined:
    Feb 23, 2018
    Messages:
    2
    Location:
    Brazil
    Balance:
    112Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    Arduino
    If someone could help me out, I'm trying to use Simtools with the plugin provided by Claudio (great work by the way!) .

    It is sending information to his UDP servers (I don't have the SCN5 actuators here with me yet), but as can be seen on the attached screeshot, unreal is sending the same values repeatedly, and are the same values defined in the Blueprint inside unreal no matter how hard I turn and move the car.

    Is that supposed to be like that or should it vary according to movement? If so, should it be connected to the car geometry somehow?

    I appreciate the help! Thanks!

    print.jpg
  9. Spacebar

    Spacebar New Member

    Joined:
    Dec 15, 2017
    Messages:
    19
    Location:
    United States
    Balance:
    271Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    3DOF, 6DOF
    Did you make any progress? The short answer is yes. The tilt and roll are handled a little differently. If you haven't already, I would start by tying your acceleration (in game)to your pitch. You may have already done that but it's a little hard to tell from your blueprint. Roll is tied to x translation.

    Side note, had anyone experimented with tying pitch and z translation (platform) to acceleration (in game) at the same time?
  10. Strider

    Strider New Member

    Joined:
    Feb 23, 2018
    Messages:
    2
    Location:
    Brazil
    Balance:
    112Coins
    Ratings:
    +1 / 0 / -0
    My Motion Simulator:
    Arduino
    Thanks for the reply. I actually still haven't had time to test it further, but it seems to be pretty close to have it working. Will post something as soon as I get anything new.
    • Friendly Friendly x 1
  11. Spacebar

    Spacebar New Member

    Joined:
    Dec 15, 2017
    Messages:
    19
    Location:
    United States
    Balance:
    271Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    3DOF, 6DOF
    I had a friend over trying to send udp data to game engine to test connectivity, we used ncat from the nmap package to test connectivity.

    before testing game engine we did a 2 way connectivity test:

    to send data:
    echo 30,30,30,0,0,0,0,0,0 | ncat.exe 127.0.0.1 4123 -u

    to recieve:
    ncat.exe -l -u 4123

    data was successfully sent and received.

    next, we started game engine, and tried to send the data, but got the error: An existing connection was forcibly closed by the remote host, this means nothing was listening on 4123. Based on the documentation we read that is the default port game engine should be listening on, we have the motion platform working correctly when using Output testing in game engine, but when we try and move the motion platform with the above udp socket nothing happens.

    we tried this plugin as well, with no success.
    https://github.com/ddkclaudio/QuplaySimTools/tree/master/Unity3D
  12. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,133
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    47,913Coins
    Ratings:
    +5,027 / 16 / -0
    Port 4123 is used by game plugin should the game use 4123 to send data on, not Game Engine itself.
    For instance when you start Live for Speed, it will send data to port 4123.
    Therefore the game plugin catches this output on port 4123 in GameEngine.
    But the port that is used depends on what app/game is sending the data.

    My other question would be did you patch/activate the game plugin in game manger?
    As nothing will happen if the game plugin is not patched/activated.

    chat soon buddy,
    yobuddy
    • Informative Informative x 1
  13. Rafael Vasquez

    Rafael Vasquez New Member

    Joined:
    Jan 24, 2019
    Messages:
    8
    Balance:
    122Coins
    Ratings:
    +3 / 1 / -0
    My Motion Simulator:
    3DOF
    Interested in using my DOFReality rig with a Unity simulation I'm working on. Still new to the process and unfortunately stuck on adding the plugin to SimTools at all right now. I've tried many times: closed SimTools and opened the plugin updater, dragged and dropped. Received "Files Installed! - Installing Complete" message every time. Yet, nothing new shows up in my games list. Any help?
  14. Spacebar

    Spacebar New Member

    Joined:
    Dec 15, 2017
    Messages:
    19
    Location:
    United States
    Balance:
    271Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    3DOF, 6DOF
    Sorry..so should we not be using Game Engine when going out from unity editor? Im assuming we dont have to do a build while testing.

    Does anyone know of a simple project that is setup already they would be willing to share?
  15. Spacebar

    Spacebar New Member

    Joined:
    Dec 15, 2017
    Messages:
    19
    Location:
    United States
    Balance:
    271Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    3DOF, 6DOF
    @Raphael Vasquez

    What game are you trying to add?
  16. Rafael Vasquez

    Rafael Vasquez New Member

    Joined:
    Jan 24, 2019
    Messages:
    8
    Balance:
    122Coins
    Ratings:
    +3 / 1 / -0
    My Motion Simulator:
    3DOF
    Ignore me. I figured it out. Got the Quplay proof-of-concept to work, able to receive the random values between -180 and 180 being sent from Unity to Simtools and getting my rig to move.

    I guess next I have to figure out how to get values for Roll, Pitch, Yaw, etc from the car object itself in Unity. Any help? I'll definitely be sharing what I have when it's working.
  17. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    20,465
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    144,626Coins
    Ratings:
    +10,741 / 52 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
    It would be helpful to know what the issue/resolution was, if you wouldn't mind detailing it a bit more.

    I have not tried it but this looks like a reasonable place to start with roll, pitch and yaw: https://answers.unity.com/questions/416169/finding-pitchrollyaw-from-quaternions.html#

    roll = Mathf.Atan2(2*y*w - 2*x*z, 1 - 2*y*y - 2*z*z);
    pitch = Mathf.Atan2(2*x*w - 2*y*z, 1 - 2*x*x - 2*z*z);
    yaw = Mathf.Asin(2*x*y + 2*z*w);​
    • Informative Informative x 1
  18. Rafael Vasquez

    Rafael Vasquez New Member

    Joined:
    Jan 24, 2019
    Messages:
    8
    Balance:
    122Coins
    Ratings:
    +3 / 1 / -0
    My Motion Simulator:
    3DOF
    Well I realized that I actually had to build the project for the Quplay plugin in order to create the plugin itself. Not sure if that instruction is mentioned anywhere but after reading more about plugins I realized that I wasn't actually feeding the Plugin Updater a real plugin at all. From there, I took Quplay's Unity scripts and set up a network interface on Simtools to interface with the correct port (4123) and it all worked.

    I'm still working on the car physics in Unity. I did manage to get a realistic-enough roll movement when I turn the car in Unity. I used a variation of the formula suggested here and the important work had to do with tuning the max/mins in SimTools.

    The next feature I'm working on has to do with Pitch, most importantly for strong acceleration/braking.
    • Like Like x 2
  19. Spacebar

    Spacebar New Member

    Joined:
    Dec 15, 2017
    Messages:
    19
    Location:
    United States
    Balance:
    271Coins
    Ratings:
    +3 / 0 / -0
    My Motion Simulator:
    3DOF, 6DOF
    Great! thank you. That is good to know. How is the game coming along? I have a lot of experience on the art/lighting side if you need any help polishing the look.
    • Friendly Friendly x 2
  20. PhilMassler

    PhilMassler New Member

    Joined:
    May 28, 2019
    Messages:
    5
    Balance:
    92Coins
    Ratings:
    +4 / 0 / -0
    My Motion Simulator:
    2DOF
    Hello,
    i am a student from Germany and for an university project we built a Motionrig. We got everything to work with simtools and steam games, but our next step is making it work with our own unity-VR-game. I am not a professional and my IT and networking skills are very limited, so please excuse me for asking stupid questions.
    I tried to use the solution by @Claudio Silva, but it didn't work out. In Unity i created a Script that sends the UDP-Packages which should be working. Then i built the game and created a plugin for Simtools. In the simtools game manager the game showed up in the list, but when i tryed to patch it it gave me this notification:
    "You Must first install and Run the Game Once Prior to Patching. You may also add Custom Game Installation Directories below!"
    This is where i am at right now and i dont know how to fix this issue. Also in the solution by Claudio Silva there is a folder named "SimpleUDPReciever" which i didnt use because i have no idea what its for, so this might be the cause of the problem.

    If someone could help me to get unity to work with simtools that would be great, as i saw in the thread that some people made it work for them.

    Thanks!
    Phil