Argelius
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 4047 |
|
|
| 15 Oct 2015 09:40 PM |
| One of my games has been working perfectly for the last few days, the game hasn't been updated for almost 2 weeks. Today there was apparently a Roblox client update, and now the camera is upside down. wtf? |
|
|
| Report Abuse |
|
|
Casualist
|
  |
| Joined: 26 Jun 2014 |
| Total Posts: 4443 |
|
|
| 15 Oct 2015 09:50 PM |
| Code? It's doubtful they've changed the model on which the maths are based, so the likely issue is that you are taking something for granted (much like how many people take instantaneous client loading as a given). |
|
|
| Report Abuse |
|
|
Argelius
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 4047 |
|
|
| 15 Oct 2015 10:00 PM |
game.Workspace.CurrentCamera.CoordinateFrame = game.Workspace.CurrentCamera.CoordinateFrame *CFrame.Angles(4.25,.4,0)
this is the code I have been using |
|
|
| Report Abuse |
|
|
Argelius
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 4047 |
|
|
| 15 Oct 2015 10:02 PM |
| once I have new x y and z values I will tell you what it's supposed to be doing. |
|
|
| Report Abuse |
|
|
Argelius
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 4047 |
|
|
| 15 Oct 2015 10:10 PM |
game.Workspace.CurrentCamera.CoordinateFrame = game.Workspace.CurrentCamera.CoordinateFrame *CFrame.Angles(3.62,0.7,2.78)
As you can see, I had to change the values completely to get the same camera angle that I was getting before. Why would this happen? |
|
|
| Report Abuse |
|
|
Argelius
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 4047 |
|
|
| 15 Oct 2015 10:16 PM |
| actually after some more trial and error, (4.25,0.4,2.45) is closer to the angle I had before, so the z value changed... |
|
|
| Report Abuse |
|
|
Casualist
|
  |
| Joined: 26 Jun 2014 |
| Total Posts: 4443 |
|
|
| 15 Oct 2015 10:17 PM |
| You've shown me one line of code. All I know is you're applying a rotation to a preexisting CFrame, but that doesn't even tell me a little about the actual problem. |
|
|
| Report Abuse |
|
|
Argelius
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 4047 |
|
|
| 15 Oct 2015 10:34 PM |
| The problem is that I assigned static values to the camera's rotation, it provided the desired result for weeks, maybe months, and all of a sudden it's doing something completely different even though I made no changes at all. Now I had to change the Z value from 0 to 2.45 to get the camera angle I was getting before. There is no other code that affects the camera rotation to show you. |
|
|
| Report Abuse |
|
|
Casualist
|
  |
| Joined: 26 Jun 2014 |
| Total Posts: 4443 |
|
|
| 15 Oct 2015 10:40 PM |
| Can you link me to the offending place then? |
|
|
| Report Abuse |
|
|
Argelius
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 4047 |
|
|
| 15 Oct 2015 10:47 PM |
http://www.roblox.com/games/282763164/Clash-of-Bloxians-Beta
Notice the date last updated is 10/4, it was working normally a day or two ago though, and the problem started today. I have it fixed already in another copy of the game but am still curious why it happened |
|
|
| Report Abuse |
|
|
Casualist
|
  |
| Joined: 26 Jun 2014 |
| Total Posts: 4443 |
|
|
| 15 Oct 2015 10:54 PM |
Lol. The issue is you are grabbing the initial roblox defined CFrame and performing a translation on that. For this to work properly you are at the mercy of whatever initial CFrame they set (which can change at anytime). Since you set the CFrame relative to an initial value and run with it you run into problems.
What you should be doing is:
workspace.CurrentCamera.CoordinateFrame = CFrame.Angles(X, Y, Z) + Vector3.new(offsetx, offsety, offsetz)
And you'll never have this issue again. |
|
|
| Report Abuse |
|
|