#1

Hey, I'm making something and now i need to do something which isnt my strongest part. I have 2 Points

The Player Camera Pos
The Player Pos


Now i want to make an object that is pointing forward, viewing from the camera, HOW?

I know its possible i just have know idea how, its probably something with sincostan

If you dont understand what my point is, post please.
Reply
#2

dont get it
as i fugred out you want to make object pointing to player
so just make object in mta map editor save player pos and camera pos behind that object, thats it
Reply
#3

You want an object which is "facing" the camera, and camera is facing the object so you can see the front of the object?


Код:
back of object > []------------[] < back of camera
                         ^
             line of sight (literally)
Reply
#4

Код:
Object   <--<---<--You(player)<----<----<---YourCamera
And now, i want the object to face that way, get it now? So that you look onto the back of the object, as LarzI said
Reply
#5

Quote:
Originally Posted by Bessensap
Посмотреть сообщение
Код:
Object   <--<---<--You(player)<----<----<---YourCamera
And now, i want the object to face that way, get it now? So that you look onto the back of the object, as LarzI said
You misunderstood what I meant, but by misunderstanding what I meant, I got what you meant. x3
Reply
#6

Alright, That's good. Now all i need is the solution
Reply
#7

Quote:
Originally Posted by Bessensap
Посмотреть сообщение
Alright, That's good. Now all i need is the solution
then make object in MTA MAP EDITOR behind your player at spawn point... simple
EDIT: you can rotate objects in mta too
Reply
#8

Quote:
Originally Posted by HrvojeCro
Посмотреть сообщение
then make object in MTA MAP EDITOR behind your player at spawn point... simple
EDIT: you can rotate objects in mta too
*sigh*

You obviously don't get it.
It's not 1 object, theres going to be a greater number of objects, which will spawn where my camera is looking, but i want the object to point in the same direction
Reply
#9

i don`t think thats what he wants.

if i understood correctly, you need this function: (from ******)

pawn Код:
stock GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y,       Float:distance) {                                                       
    new
        vid=GetPlayerVehicleID(playerid),
        Float:a;
    if (vid) {
        GetVehiclePos(vid,x,y,a);
        GetVehicleZAngle(vid, a);
    }
    else {
        GetPlayerPos(playerid, x, y, a);
        GetPlayerFacingAngle(playerid, a);
    }
    x += (distance * floatsin(-a, degrees));
    y += (distance * floatcos(-a, degrees));
}
then CreateObject with these coordinates
Reply
#10

Already have that one, but not what im looking for. Its about the CAMERA POS and not where the vehicle/player is facing, and it already makes the object etc all i want is to make it point forward
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)