123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|519|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> First Person Mouse code request :)

Fri, 01 Jul 2016, 02:53
Pakz
I had always used code from the blitz code archives from edzup but that does not work on my new laptop. I am looking for code that makes the mouse move the camera like in the first person shooters.

The one I am using now is not as accurate.

Does anyone have a snippet they wish to put in the snippets here on sc?
Fri, 01 Jul 2016, 03:02
Jayenkai
Set the campivot to the head/eye's center, add the cam so that it's parent is the campivot.
Move the cam either back or forward a notch, so you get the right feel for "eyes on a head".

Next, use a couple of variables to keep track of the mouse.
mx=MouseX()-screencenter_width
my=MouseY()-screencenter_height
Then MoveMouse to screencenter

All you need to do, then, is TurnEntity campivot using mx and my.
You'll have to play about with values a bit, changing from mx to -mx and back again, and switching them around within the three rotation axis, until it feels right. Trial and Error.

In the end, that depends more on how you've orientated the rest of the game, so no single answer will be perfect. It'll be up to you to find the right axis for your game.

-=-=-
''Load, Next List!''