|
| 01 Nov 2016 03:35 PM |
| How can I set the Camera's CFrame to the position, Y, and Z rotation, every frame, immediately, but have it "interpolate" only the X rotation? |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2016 03:37 PM |
"VERY ADVANCED" Camera manipulation =/= "Advanced" |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2016 03:39 PM |
Looking at my scripts, you can't "interpolate" only the X.
|
|
|
| Report Abuse |
|
|
|
| 01 Nov 2016 03:40 PM |
| In this situation it is, because I cannot use a loop to interpolate the number. It isn't defining a simple variable for X and adding on to it. |
|
|
| Report Abuse |
|
|
| |
|
|
| 01 Nov 2016 03:42 PM |
Oh I see now. I apologize for my rude comment.
This is probably a terrible solution but why not just do it the noob way?
x = x + 1 x = x + 2 etc. |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2016 03:45 PM |
| This is exactly what I'm trying to avoid, I know I could create an inefficient priority system to break the loops mid-way through, but there HAS to be a better way! |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2016 03:48 PM |
I'm not exactly 100% sure the situation you're in, but maybe try setting a whole nother variable for the rotation?
local rotation = 1337
for i= 1, ovar 9000 do rotation = rotation + 1 camerarotation = rotation end |
|
|
| Report Abuse |
|
|
Lordux
|
  |
| Joined: 10 Jun 2010 |
| Total Posts: 610 |
|
|
| 01 Nov 2016 03:49 PM |
If you want to break a loop midway you could use yields in coroutines. This would allow you to change your values you want to insert and then resume the coroutine.
Sorry if this answer doesn't make sense but your OP was kind of vague to me. |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2016 03:51 PM |
Sigh.
I have this:
local CameraOffset=CFrame.new(0,1,-0.5) local CameraRot = 0
--renderstepped camera.CFrame = RootPart.CFrame*CameraOffset*CFrame.Angles(CameraRot, 0, 0)
And pretty much, CameraRot needs to be lerped *without an external loop, completely in renderstepped*, while the position is constant.
This isn't my exact code, but this is the gist of what I need to do. |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2016 03:52 PM |
Okay, you know what, I'm done being nice. @Lordux Read the post before replying, you're trash kid. Get english skills. |
|
|
| Report Abuse |
|
|
Lordux
|
  |
| Joined: 10 Jun 2010 |
| Total Posts: 610 |
|
|
| 01 Nov 2016 03:58 PM |
| How rude, try actually explaining your problem thoroughly in the OP next time. You never even mentioned renderstepped or anything in your OP you just added in new constraints to the question. |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2016 04:09 PM |
In the initial problem I had thought it was clear enough, and it was apparently not. I then specified, and while scrolling down to press reply, you couldn't take 1 second to read it? This isn't my fault, it had been mentioned. And no extra constraints had been added _at all_. I had clearly said "every frame", meaning that you could _infer_ that I did not want a loop taking several frames. |
|
|
| Report Abuse |
|
|
Lordux
|
  |
| Joined: 10 Jun 2010 |
| Total Posts: 610 |
|
|
| 01 Nov 2016 04:12 PM |
| Your specification with render stepped came after my reply. At least on my screen. But my point is that you don't have to be super rude and resort to ad hominem remarks on the forum just because somebody replied in a way that doesn't help you. I am sorry if my reply didn't help you but that still does not justify such rude remarks. |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2016 04:17 PM |
It does. In the OP, it was stated that it needed to be _every frame_, not drawn out of several frames. It was already implied, and I simply elaborated for the first person who made that mistake. Then, you make the some one after it has been said _two times_? No, I think you are definitely at fault for not reading. |
|
|
| Report Abuse |
|
|
Lordux
|
  |
| Joined: 10 Jun 2010 |
| Total Posts: 610 |
|
|
| 01 Nov 2016 04:19 PM |
| You cannot just imply something on a forum. People don't analyze your sentences since YOU need help YOU need to EXPLICITLY state your problem and why you cannot take specific solutions. And please quote the post where you explained it the first time since apparently I was the second time. |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2016 04:22 PM |
| Can't we all just get along? Why so hostile? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 01 Nov 2016 04:28 PM |
| When people don't know how to help, they flame |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2016 04:40 PM |
Linear interpolation is actually very basic math and can work on pretty much anything, it can be accomplished with regular numbers using a function such as this:
local lerp = function(start, end, t) return start + ((end-start) * t) end
It seems like you already have the rotations as numbers. That should be enough for you to figure out the rest. |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2016 04:41 PM |
I'm done talking to you. I don't need to tell you _why_ I can't take a solution, I simply told you I can't and that should be that. Take my word for it, why don't you? And on top of that, it was my second post, quite easy to find.
@Cntkillme Can you please help? |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2016 04:42 PM |
@Filip Someone who mindlessly posted an answer.... Clearly I know how to interpolate, clearly I only want to interpolate one rotation axis while keeping everything else the same. I'm getting mad at this point. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 01 Nov 2016 04:45 PM |
| I mean if you already have the X Y and Z angles just use CFrame's Lerp, but I don't entirely know what you want |
|
|
| Report Abuse |
|
|
Lordux
|
  |
| Joined: 10 Jun 2010 |
| Total Posts: 610 |
|
|
| 01 Nov 2016 04:50 PM |
| lua you need counseling for your anger issues |
|
|
| Report Abuse |
|
|
|
| 01 Nov 2016 04:50 PM |
I don't entirely know what you want [2] Link youtube video example in another game or something.
|
|
|
| Report Abuse |
|
|
|
| 01 Nov 2016 04:52 PM |
soo what you want to do is ease a cframe on 1 axis rotation ?
local Y,Z,Position <- those are fixed ? renderstepped local X = i + math.pi/360 cam.CFrame = CFrame.new(position) * CFrame.Angles(X, Y, Z)
can you give a example what should happen from what to what do you want to interpolate the X rotation?
|
|
|
| Report Abuse |
|
|