Camera pos problem
#2

Movement keys (up, down, left, right) aren't detected by OnPlayerKeyStateChange, as it clearly states on the wiki. If you explicitly need those key, you'll probably want to use OnPlayerUpdate combined with some other variable to verify that the camera should change.

Also, you can't really compare floating point values like that because floats aren't exact. The x position retrieved from camerapos may be 340.619999. This isn't the same as 340.62 and thus the code will probably fail (I don't know the exact mechanics behind float comparison).
Reply


Messages In This Thread
Camera pos problem - by cnoopers - 14.07.2014, 15:40
Re: Camera pos problem - by Vince - 14.07.2014, 16:14
Re: Camera pos problem - by cnoopers - 15.07.2014, 11:15
Re: Camera pos problem - by BroZeus - 15.07.2014, 11:26
Re: Camera pos problem - by cnoopers - 15.07.2014, 11:28
Re: Camera pos problem - by BroZeus - 15.07.2014, 11:29
Re: Camera pos problem - by cnoopers - 15.07.2014, 11:37
Re: Camera pos problem - by cnoopers - 16.07.2014, 10:33

Forum Jump:


Users browsing this thread: 3 Guest(s)