Fangame How-to:SonicGDK/Set up sidescroller (2.5D) sections
From Sonic Retro
(Original guide by Xaklse)
This article is a work in progress. Its content and location may change completely and frequently until this notice is removed. |
UDK has SplineActors; SonicGDK uses SGDKSplineActors, which are based on the previous ones.
First you should use SGDKSplineActors to define the 2D constrained path, the straight purple arrows of the SGDKSplineActors must point to the background.
To change the camera, you have to use a Trigger, TriggerVolume, SensorActor or similar. The SensorActor is like a TriggerVolume but is able to generate 3 types of events:
- "Touched"; pawn is whithin the sensor.
- "UnTouched (Front)"; pawn is in front of the sensor.
- "UnTouched (Back)"; pawn is behind the sensor.
The attached red arrow points to forward and the blue one points to backward.
Copy CameraInfo_6 from the SonicGDKTestMap to your map and use it for the "Camera Info" param of a new "Set Camera Style" Kismet node (New Action>SGDK>Set Camera Style); attach an "All players" object to the "Target" param. You have to trigger the node with a Trigger, TriggerVolume, SensorActor or similar.
Test, if the camera zooms out then you're doing it well. Change the "Camera Offset Vector" of the copied CameraInfo to adjust the camera location.