GetXYInfrontOfObject
#1

GetXYInfrontOfObject
Hello, I build something and i want to find the point in front of object, I did like this:
Код:
atmInfo[i][atmX] += (1.0 * floatsin(atmInfo[i][atmRZ], degrees));
atmInfo[i][atmY] += (1.0 * floatcos(atmInfo[i][atmRZ], degrees));
Here example of object saving:
Код:
{0, 0, (Text3D:1024), -2032.9000244,164.5000000,28.5000000,0.0000000,0.0000000,90.0000000}
It's not fully working, sometimes it set the point in back or at right of the object...
How i can fix this?
Reply
#2

atmInfo[i][atmX] += (1.0 * floatsin(-atmInfo[i][atmRZ], degrees));
atmInfo[i][atmY] += (1.0 * floatcos(-atmInfo[i][atmRZ], degrees));
Reply
#3

Quote:
Originally Posted by yusei
Посмотреть сообщение
atmInfo[i][atmX] += (1.0 * floatsin(-atmInfo[i][atmRZ], degrees));
atmInfo[i][atmY] += (1.0 * floatcos(-atmInfo[i][atmRZ], degrees));
Not working...

UPD:
Fixed!
The code:
Код:
atmInfo[i][atmX] -= (1.0 * floatsin(atmInfo[i][atmRZ], degrees));
atmInfo[i][atmY] -= (1.0 * floatcos(atmInfo[i][atmRZ], degrees));
I forget to change += to -=!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)