Welcome to the new Diaspora forums, please let us know if you see anything broken! Notice: Some users may need to reupload their avatars due to an issue during forum setup!
Freeflying Cinematic Camera
Paste and goooooo
Supports saving start points. Type !set Nameofscenestart to set a point, and then !Nameofscenestart to retrieve it.
The camera will now pan around the point you are looking at when you hold alt fire.
Supports saving start points. Type !set Nameofscenestart to set a point, and then !Nameofscenestart to retrieve it.
The camera will now pan around the point you are looking at when you hold alt fire.
@name Free flying camera @persist Accel Panning @persist Pos:vector @persist Ang:angle @persist Pan:array @persist Table:table #By Katelyn interval(50) if (first()) { runOnLast(1) runOnChat(1) Pos = owner():shootPos() Ang = ang() Accel = 4 rangerIgnoreWorld(0) rangerHitEntities(1) rangerHitWater(0) rangerPersist(1) } if (chatClk(owner()) & lastSaid()[1] == "!") { Cmd = lastSaid():trim():lower():sub(2):explode(" ") if (Cmd[1, string] == "set" & Cmd[2, string] != "") { R = array() R[1, vector] = Pos R[2, angle] = owner():eyeAngles() Table[Cmd[2, string], array] = R:clone() } elseif (Cmd[1, string] == "set" & Cmd[2, string] == "") { print("You need a second argument") } else { Pos = Table[Cmd[1, string], array][1, vector] Ang = Table[Cmd[1, string], array][2, angle] - owner():eyeAngles() } hideChat(1) } Panning = owner():keyAttack2() if (changed(Panning) & Panning) { Pan:clear() Pan[1, ranger] = rangerOffset(35000, Pos, owner():eye() + vec(Ang)) Pan[2, vector] = Pan[1, ranger]:position() Pan[3, number] = Pan[1, ranger]:distance() } if (!Panning) { A = Pos Pos = Pos + (owner():eye() * ((owner():keyForward() - owner():keyBack()) * Accel)) Pos = Pos + (owner():right() * ((owner():keyRight() - owner():keyLeft()) * Accel)) Pos = Pos + (vec(0,0,1) * ((owner():keyJump() - owner():keyDuck()) * Accel)) if (A != Pos) { Accel += (1 + (owner():keySpeed() * 2)) } else { Accel = 4 } } else { #x = r * cos(s) * sin(t) #y = r * sin(s) * sin(t) #z = r * cos(t) Bear = (owner():eyeAngles() + Ang):yaw() Elev = (owner():eyeAngles() + Ang):pitch() -90 Pan[3, number] = Pan[3, number] - (5 * (owner():keyForward() - owner():keyBack())) X = Pan[3, number] * cos(Bear) * sin(Elev) Y = Pan[3, number] * sin(Bear) * sin(Elev) Z = Pan[3, number] * cos(Elev) Vec = vec(X, Y, Z) Pos = Pan[2, vector] + Vec } Pos = clamp(Pos, -16500, 16500) Accel = clamp(Accel, 4, 60) owner():setView(1, Pos, owner():eyeAngles() + Ang) if (last()) { owner():setView(0, vec(), ang()) }
Comments
As of this moment you and are have been declared TROLLS guess we better go found our bridge and beware those goats!