
In other words, blue is for X bend, red is for Y bendĬurved._V_CW_Bend_Y+=Ycont*Mathf.Sin(Mathf.Deg2Rad*(lerAngles. And because both axis are moving (X and Y) I sum the values. We have to find both lengths (green lines). How do I apply, considering the Z rotation (of the object) was 0, the appropriate amount to bend_X and _Y to look exactly the same curvature? The answer relies on trigonometry. Now, I rotate the camera around the remaining Z axis 45 degrees. The vertical axis line is the curved._V_CW_Bend_Y paramenter Imagine the black horizontal line axis as the _V_CW_Bend_X parameter The reasoning comes from the following picture:

#TOONY COLORS PRO BACKFACE CULLING UPDATE#
Considering I was working with many objects (up to a thousand, considering the worst scenario), rotating the game area caused dips from 900 to 300 fps almost, due to update method with triggers rotating and a lot of gameobjects rotating too. These work on Update method, and for the moment, aside from the jerkiness of changing lane quickly, it works pretty smooth. For the Y angle, getting the -90 degrees of difference seemed imperative. I multiply each of the values by the respective sinus and cosinus. However I have to tune it up a bit because it does some jerky stuff sometimes.Ĭurved._V_CW_Bend_X=Xcont*Mathf.Cos(Mathf.Deg2Rad*) Ĭurved._V_CW_Bend_Y=Xcont*Mathf.Sin(Mathf.Deg2Rad*) Ĭurved._V_CW_Bend_X+=Ycont*Mathf.Cos(Mathf.Deg2Rad*(-90)) Ĭurved._V_CW_Bend_Y+=Ycont*Mathf.Sin(Mathf.Deg2Rad*(-90)) Ĭurved is a reference to the curved controller, Xcont and Ycont are the current values for the dynamic transitioning I have. If I missed anything and there's an option to do this, please do tell!Īs an update, I did manage to get the rotation from the pivot through a custom script. Now, I think I can solve this by applying some calculations, but maybe it would be nice if you were able to give us an option where the pivot can also be taken as a reference point for rotations? it's more of a suggestion than anything else. If I do two lanes to the right, it will be bent to the right. Now the problem is with curved world, because it will take world coordinates for rotation and i'm struggling to find a way to rotate the influence on each angle accordingly to the camera rotation.Įxample: if i have a tunnel that is using 10 influence on the X axis, it will bend upwards. For the most part, this did the trick of changing the lane without having to move anything but two transforms. However the complication comes because I want to make so when the ball changes lane (6 tunnel-like lanes), the camera and the ball would rotate. Instead i'll make the ball character move forward. Since i'm doing some optimization, the first thing that came to mind: many objects=many transforms moving, can't have them all moving creating the treadmill illusion because it will lower performance. Since there's so many gameobjects (imagine 215*6 sides) for example, there's a lot of transforms inside the parent where I stick them all. Curved world helps me create the twisted tunnel horizon feeling. I have many many gameObjects constructing a world forming a tunnel. I'm currently facing a challenge, and i'd like to share it: Thanks in some questions about Curved World - Classic Runner I'm mostly interested in mobile use and only about path-like deformation so this looks pretty good fit. Move track / objects in world space instead of camera and they will just move inside deformed space? Turn my head 45 degrees to left or right (for example) I got the impression this is world space effect - So can I: Do I have to take special care for collision objects along path, say, if I have blocks on the road, and road is moving closer to player like on threadmill, do I have to care about player-object collisions or do I hit colliders on correct location despite of deformation? I see there is some sort script support for point lights and such, that is why I ask.ĥ.

Is there a direct method to control bending effect in real-time from code?Ĥ.
#TOONY COLORS PRO BACKFACE CULLING MANUAL#
Is there a public manual? I did quickly read all the pages in this thread but it would be nice to see the manual in advance.ģ. Do the images represent features of asset, as it seems like the images are showing bending along x-axis (half-pipe shape), instead of just depth and sideways "bending" typical of road/track based "classic" runners?Ģ. Some questions about Curved World - Classic Runner ġ.
