Author Topic: LU First Person View  (Read 1342 times)

talon

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
LU First Person View
« on: April 17, 2016, 01:44:23 am »
Are there any first person view mods or ones that are server implemented for LU?

Motley

  • Full Member
  • ***
  • Posts: 252
  • Karma: +32/-34
    • View Profile
Re: LU First Person View
« Reply #1 on: April 17, 2016, 01:57:33 am »
It could be done(but I have not seen it myself) but players may seem to lag(I could be wrong)

Hopefully Theremin will reply as he was messing around with this in the past.

Theremin

  • Full Member
  • ***
  • Posts: 154
  • Karma: +48/-18
  • Worst Server Owner
    • View Profile
    • Visit my YouTube channel
Re: LU First Person View
« Reply #2 on: April 17, 2016, 12:58:43 pm »
Motley is correct I was working in one months ago, but it was buggy as fuck. I was able to rotate the camera with the arrow keys in a Doom-ish style, but the camera kept switching very rapidly between two different angles if you did it while moving. Then when I tried detecting the mouse I had problems on figuring out how to do it, since the mouse is detected in 2D while of course the movement in game is in 3D. So that's why I eventually gave up and dropped the idea.

Motley

  • Full Member
  • ***
  • Posts: 252
  • Karma: +32/-34
    • View Profile
Re: LU First Person View
« Reply #3 on: April 17, 2016, 06:33:08 pm »
I wonder what happens if you modify this
http://forum.liberty-unleashed.co.uk/index.php/topic,1765.msg10159.html#msg10159
Into first person. But like you stated above with the issues that was created it  would possibly be a waste of time.

Theremin

  • Full Member
  • ***
  • Posts: 154
  • Karma: +48/-18
  • Worst Server Owner
    • View Profile
    • Visit my YouTube channel
Re: LU First Person View
« Reply #4 on: April 19, 2016, 04:30:14 pm »
Well I guess those issues could be solved If I was a better scripter. Plus the annoying bug is related to keyboard controls. GTA3 is horrible if you're supposed to move the camera just via keyboard, yes classic controls is a thing, but you have auto-aim there. Now as for that spectating script, it relies just on bound keys to move the camera, and there was no other way at the time, since mouse functions have been added with the 0.15 update.

  • Scripting - Added mouse movement/button related events to scripts - onClientMouseMove( short x, short y ), onclientMouseClick( int button, bool down, short x, short y ), onClientMouseWheel( bool moved )
  • Scripting - Added scripting/gui lib functions to get/set mouse cursor position (client) - VectorScreen GetMouseCursorPos( void ), SetMouseCursorPos( VectorScreen pos )

In theory it's not hard to be realized, you need to detect mouse movement in 2D and then move the camera in 3D accordingly. There are several pages you can find about that on the web, most results I got were Unity Engine topics. However you won't see me releasing such a script, for the reasons I stated in my previous post.

 

© Liberty Unleashed Team.