This tutorial goes more in to the use of 3d and show how you can manipulate the 3d Camera to make a simple map while changing perspective.
You will want a fairly large layout to accommodate for long views and higher z values. Luckily the map used is huge.
The events:
+ System: Every tick
-> 3DCamera: Set camera position to (camdum.X, camdum.Y, camdum.ZElevation), look at (camdum.X+cos(camdum.Angle)×camdum.offsetx, camdum.Y+sin(camdum.Angle)×camdum.offsety, camdum.lz), up vector (0, 0, 1)
We cast a ray with our trig formula to set where the camera looks... every tick. Note the offsetx, offsety, and lz do the perspective changes.
+ System: On start of layout
-> Audio: Play music_fx_slow_paced_background_music_from_a_spaghetti.webm not looping at volume 0 dB (stereo pan 0, tag "fade")
-> System: Wait 1.0 seconds
-> camdum: Tween "" property Angle to 270 in 5 seconds (In Out Sinusoidal, destroy: No, loop: No, ping pong: No, repeat count: 1)
-> camdum: Tween "dist" value from 100 to 1 in 5 seconds (In Out Sinusoidal, destroy: No, loop: No, ping pong: No, repeat count: 1)
-> camdum: Tween "lookz" value from 45 to 0 in 5 seconds (In Out Sinusoidal, destroy: No, loop: No, ping pong: No, repeat count: 1)
-> System: Wait 1.0 seconds
-> camdum: Tween "move" property Position to 1604, 4236 in 15 seconds (In Out Sinusoidal, destroy: No, loop: No, ping pong: No, repeat count: 1)
-> System: Wait 20 seconds
-> Audio: Fade "fade" volume to -100 dB over 5 seconds, then stop
-> Sprite: Destroy
Tween the angle of the camera. Tween its perspective, and tween its xy. Note distance is a multiplier so the end value is one instead of zero.
Find the source here
Comments
Post a Comment