Notice to all users

We are migrating towards a new forum system located at, as such this forum will become read-only on January 29, 2020

Results 1 to 1 of 1
  1. #1
    Join Date
    June 2015

    Help with 3D positioning (code attached)

    Hi there.

    I've been trying to set 3D positioning with the latest SDK but have failed to do so.

    Basically, using the client example code in the examples folder, I replaced the getch() loop with calls to ts3client_systemset3DListenerAttributes() and ts3client_channelset3DAttributes(). The player is moving along the X axis at each iteration while the "other" client stays stationary. I also implemented the onCustom3dRolloffCalculationClientEvent() callback.

    	TS3_VECTOR myPos = { 0.f,0.f,0.f }, myFwd = { 1.f,0.f,0.f }, myUp = { 0.f,0.f,1.f };
    	TS3_VECTOR hisPos = { 0.f,0.f,0.f };
    	if (ts3client_systemset3DSettings(scHandlerID, 1.f, 0.5f) != ERROR_ok)
    		return 1;
        while(!abort) {
    		myPos.x += 1.f;
    		printf("myPos = <%f, %f, %f>\n", myPos.x, myPos.y, myPos.z);
    		if (ts3client_systemset3DListenerAttributes(scHandlerID, &myPos, &myFwd, &myUp) != ERROR_ok)
    			printf("ts3client_systemset3DListenerAttributes failed\n");
    			return 1;
    		if (ts3client_channelset3DAttributes(scHandlerID, 1, &hisPos) != ERROR_ok)
    			printf("ts3client_channelset3DAttributes failed\n");
    			return 1;
    N.B. The other client in ts3client_channelset3DAttributes() is hardcoded to 1, so be sure it is the first one connected to the server when testing this or else this function will fail.

    While I can hear the other speak, I don't perceive any changes in positioning. It was my understanding also, after reading the docs, that the onCustom3dRolloffCalculationClientEvent() callback would be triggered each time the other speaks, but it doesn't.

    I hope this be enough for your understanding. Feel free to ask any more questions if needed.
    Last edited by DrHobo; July 6th, 2015 at 03:10 PM. Reason: Specifying that the base code is the ts3_client example code.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [Resolved] Can't connect to servers, PLEASE HELP! (log attached)
    By Diatonic in forum macOS
    Replies: 2
    Last Post: September 17th, 2014, 02:01 AM
  2. [Resolved] License not attached
    By Gries in forum Linux / FreeBSD
    Replies: 1
    Last Post: February 21st, 2014, 01:02 PM
  3. [On Todo] API 3D positioning broken
    By NouberNou in forum Client Support
    Replies: 12
    Last Post: September 27th, 2012, 08:40 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts