generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: [VERY ADVANCED] Camera Manipulation

Previous Thread :: Next Thread 
lua_pointer is not online. lua_pointer
Joined: 15 Oct 2016
Total Posts: 179
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
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
01 Nov 2016 03:37 PM
"VERY ADVANCED"
Camera manipulation =/= "Advanced"
Report Abuse
The_Envelope is not online. The_Envelope
Joined: 14 Jun 2016
Total Posts: 1592
01 Nov 2016 03:39 PM
Looking at my scripts, you can't "interpolate" only the X.
Report Abuse
lua_pointer is not online. lua_pointer
Joined: 15 Oct 2016
Total Posts: 179
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
lua_pointer is not online. lua_pointer
Joined: 15 Oct 2016
Total Posts: 179
01 Nov 2016 03:42 PM
@The

[-] <------
Report Abuse
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
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
lua_pointer is not online. lua_pointer
Joined: 15 Oct 2016
Total Posts: 179
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
Intended_Pun is not online. Intended_Pun
Joined: 10 Aug 2016
Total Posts: 4384
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 is not online. 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
lua_pointer is not online. lua_pointer
Joined: 15 Oct 2016
Total Posts: 179
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
lua_pointer is not online. lua_pointer
Joined: 15 Oct 2016
Total Posts: 179
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 is not online. 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
lua_pointer is not online. lua_pointer
Joined: 15 Oct 2016
Total Posts: 179
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 is not online. 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
lua_pointer is not online. lua_pointer
Joined: 15 Oct 2016
Total Posts: 179
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 is not online. 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
synzoxre13 is not online. synzoxre13
Joined: 26 Sep 2016
Total Posts: 45
01 Nov 2016 04:22 PM
Can't we all just get along? Why so hostile?
Report Abuse
cntkillme is not online. 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
filiptibell is not online. filiptibell
Joined: 10 Mar 2013
Total Posts: 2362
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
lua_pointer is not online. lua_pointer
Joined: 15 Oct 2016
Total Posts: 179
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
lua_pointer is not online. lua_pointer
Joined: 15 Oct 2016
Total Posts: 179
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 is not online. 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 is not online. Lordux
Joined: 10 Jun 2010
Total Posts: 610
01 Nov 2016 04:50 PM
lua you need counseling for your anger issues
Report Abuse
Zarkonan_Zenheart is not online. Zarkonan_Zenheart
Joined: 29 May 2012
Total Posts: 610
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
brinkokevin is not online. brinkokevin
Joined: 25 Jul 2012
Total Posts: 1673
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image