Originally Posted By: Reconnoiter
I tried your sound + setting the player in my script as rigid + adding this to its action pXent_addforcecentral(me, vector(0,-200,200)); , and the sounds kept working until I commented the original move function out. So perhaps try adding a dummy pXent_move call so something gets updated correctly(?).


I think that doesn't seem to work, at least on my computer. I tried to add a pXent_move call but still got the problem. Did you try it on the demo I uploaded?

Code:
pXent_move(me,vector(0,0,0.1),nullvector);
		
		vec_set(player_move_vec,nullvector);
		vec_set(player_move_vec,vector(key_w-key_s,key_a-key_d,0));
		vec_normalize(player_move_vec,0.975*time_step);
		vec_rotate(player_move_vec,vector(my.pan,0,0));
		
		pXent_addforcecentral(me, player_move_vec);
		
		pXent_move(me,vector(0,0,-0.1),nullvector);



Originally Posted By: Superku
Originally Posted By: painkiller
using snd_play and changing the volume depending on the position would work, but would loose 3d sounds advantages, for example knowing if an enemy comes from the left or right side.

You can do that yourself too though, for example as follows (untested, just the idea):

vec_diff(temp,ent.x,camera.x);
temp.z = 0;
vec_normalize(temp,1);
vec_set(temp2,vector(0,-1,0));
vec_rotate(temp2,vector(camera.pan,0,0)); // pan alone should be enough, right?
var balance = vec_dot(temp,temp2)*100;
snd_tune(...,balance);

If the result is super wrong, I'd start with DEBUG_VARing the vec_dot result.


That's a good idea, I will take a look at it. Thanks superku


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB