Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / Storing negative float value

Author
Message
trietias
4
Years of Service
User Offline
Joined: 20th Jul 2015
Location:
Posted: 18th Aug 2015 08:50
Hi all,

I am having some trouble storing my GetVirtualJoystickX() to a variable.



I have no problem storing the Y vector, but for some reason the X won't store any of the negative values -- only the positive ones. This makes it so my sprite can only shoot forward haha. I've looked around the forums and tried messing around with the angles, but I feel like the problem is in the storing of the value.
trietias
4
Years of Service
User Offline
Joined: 20th Jul 2015
Location:
Posted: 18th Aug 2015 10:05
Nevermind, I figured it out and I am stupid. Can I get this topic closed?
BatVink
Moderator
16
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 18th Aug 2015 20:32
The usual "closure" to a thread is to post the answer, so that others can search and learn in the future.

There is no such thing as stupid, we all have mental blocks from time to time

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
trietias
4
Years of Service
User Offline
Joined: 20th Jul 2015
Location:
Posted: 18th Aug 2015 22:35
Haha well, my IF statement had a condition for GetVirtualJoystickX() > 0, which means it didn't enter the loop for anything < 0. I blame it on the lack of sleep haha. AppGameKit is too addicting!

Login to post a reply

Server time is: 2019-12-13 17:13:57
Your offset time is: 2019-12-13 17:13:57