Good evening/morning to you all, i am the one true freakfish and ive come to join your forum! sadly i’ve brought a problem with me, but hopefully ill be able to sort some of yours once i’ve got the hang of this.
The problem specifically is with Screen.lockCursor . I’m totally new to javascript, and im trying to learn it by cannibalising code - which is working to a point - but for some reason i cant get this to work at all. I set it to true by itself, put it in unctions to make it true, “borrowed” other peoples scripts but for some reason i cant get it to work. The reason i need it is this - the game is first person, based on the weeping angels from doctor who. i’ve named it “Dont Blink!” appropriately, and ive got it so they freeze when you put the mouse on them, but the mouse needs to be centered because its using the first person controller.
Any help here? i really just need to be showed how to use it, and i would be honoured if you would do so
lots of love from the one true ><>FreakFish<><
Really all i need is to know how to turn it on and keep it on, this is just a little experimental project where im trying to get everything working.
my quick tip which may not actually be what you’re after…
locking the cursor wasn’t working “properly” for me in the web player, on reading the docs I discovered that for it to work the user has to have clicked on the unity movie to activate it AND the cursor has to be inside the movie canvas at the time that you try to lock the cursor.
It make this happen I added a menu at the start of my demo with a “play” button, when the user clicked on it I then lock the cursor straight away therefore meeting the requirements above.
Cheers
i’m compiling for windows standalone - but this is really helpful. thanks! ill see if this solves my problem, but im still not sure about how to activate cursorlock, is it as simple as screen.lockcursor = true? or do i have to declare something first?
thanks again for the tip -
love from freakfish
online|offworld - you are absolutely brilliant! all my problems have been solved in one day and you have contributed a load. turns out it did need to be on the screen when you try to lock it, and after adding a cool menu with the help of TornadoTwins on youtube thats working too.
so i now have;
–A menu with decent decoration and a weeping angel that points at your selection as you hover over it!
–A properly locking cursor
–And finally an angel that chases me but stops completely when you look at it! (just needs some tweaking with the what your looking at)
Thank you so much for solving my problem! I hope one day to return the favor! Lots of love from ><>FreakFish<><