GetPlayerCameraTargetObject
#1

Hello,
I would like to report problem with GetPlayerCameraTargetObject. It isn't accure enough.

[ame]www.youtube.com/watch?v=UD61dlE08ks[/ame]

Also I suggest to fix Set(Player)ObjectMaterial. Options such as modelid, txdname, texturename when passing default params (-1 or none) shouldn't changing their texutre to default if it was set before. This should keep changed texture, and change only color for specific texture.
If hard to understand:

First, create an object and set texture:
Код:
SetObjectMaterial(CreateObject(19378, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0),0,14777,"int_casinoint3","GB_midbar06",0);
Now change only color:
Код:
SetPlayerObjectMaterial(playerid, obj, 0, -1, "none", "none", 0xFFFF0000);
The default texture is applied insead of the last one (14777,"int_casinoint3","GB_midbar06").
Reply
#2

It is called CameraTarget not CrosshairTarget
GetPlayerCameraTargetObject uses the center of your camera/screen and not the position of the crosshair.
Reply
#3

Yea, I know that, but couldn't be this changed when player is aiming?
Also look at rest of thing, please.
Reply
#4

@KubiPL: It can be a crosshair based function, if Kalcor does so. Now to the topic, this function depends upon player's camera's front vector scale, if the scale's magnitude is large/small then, the object detection can be done within that amount (scale's magnitude) of distance from the player/camera.
Reply
#5

I've tested it yesterday on small objects and its hard to be accurate on it because it uses the exactly center of camera, anyways, i use a custom function, heres the video:

https://www.youtube.com/watch?v=llsjbLfKJys

So much more accurate.
Reply
#6

I also recorded a video about it. However, it is a problem with the vehicle too. Look at 1:50

https://www.youtube.com/watch?v=fT94...ature=*********
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)