[BUG]: Clickable Textdraws / Player attached object editor
#1

I think this is just a minor bug but it would seem when you use Clickable textdraws and the player attached object editor together you can not move the camera to view your objects. Clickable textdraws actually work really nicely along side the attached object editor for switching the objects bone and slot of which object to edit it would be good if this minor issue could be addressed.


You can see in this screen shot clickable textdraws and the the player object editor can work together.

Reply
#2

It\'s not possible to move the camera when the cursor is enabled in any way (EditObject/SelectTextDraw).
Reply
#3

You can move the camera in EditObject mode by holding down SPRINT key to change the rotation but it won\'t work when SelectTextDraw is enabled at the same time basically. It\'s kind of a barrier for creating a full featured costume editor this is the only limitation I am experiencing.
Reply
#4

Have you tried if you can fix it with SetCameraBehindPlayer or TogglePlayerControllable?

Edit: Or changing the order: first show the selectable text draws then after that put the player in object editor mode (or vice versa).
Reply
#5

I have not tried SetCameraBehindPlayer or TogglePlayerControllable but I highly doubt this will do anything as you should be able to hold sprint to move the camera when the ObjectEditor is running which will work fine until you introduce SelectTextDraw order doesn\'t matter either I\'ve tried that.
Reply
#6

You could use OnPlayerKeyStateChange and SetCameraPosition for a temporary fix.
Reply
#7

Quote:
Originally Posted by new121
View Post
You could use OnPlayerKeyStateChange and SetCameraPosition for a temporary fix.
I don\'t think so there, OnPlayerKeyStateChange does not work when you have a clickable textdraw open.
Reply
#8

Your best bet would be to make a new clickable textdraw to move the camera
pawn Code:
if(playertextid == RotateCamTD[playerid])
        {
            switch(CameraRotate[playerid])
            {
                case 0:
                {
                    SetPlayerCameraPos(playerid, x, y, z);
                    SetPlayerCameraLookAt(playerid, x, y, z);
                    CameraRotate[playerid] = 1;
                }
                case 1:
                {
                    SetPlayerCameraPos(playerid, x, y, z);
                    SetPlayerCameraLookAt(playerid, x, y, z);
                    CameraRotate[playerid] = 2;
                }
                case 2:
                {
                    SetPlayerCameraPos(playerid, x, y, z);
                    SetPlayerCameraLookAt(playerid, x, y, z);
                    CameraRotate[playerid] = 3;    
                }
                case 3:
                {
                    SetPlayerCameraPos(playerid, x, y, z);
                    SetPlayerCameraLookAt(playerid, x, y, z);
                    CameraRotate[playerid] = 0;
                }
            }
            return 1;
        }


This is from something I did using Clickable Player TextDraws.


Hope this helps!
Reply
#9

The variable to be checked playertextid, must be different variable in the switch.
Reply
#10

Quote:
Originally Posted by DrTHE
View Post
The variable to be checked playertextid, must be different variable in the switch.
Yeah, you\'re right, I goofed in my example. hehe. Sorry, and thanks for that. Editing the post now
Reply
#11

Thanks for the idea I might give that a shot sometime.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)