Game Development Community

A couple bugs

by Shawn Simas · in Torque X Platformer Kit · 10/11/2007 (5:09 am) · 1 replies

I was playing around with the kit and starting to make my own little platform game to learn the kit + engine and came across two bugs.

1. When you jump left and then press right, your character instantly flips and faces the other direction (proper).
BUT, when you jump right and then press left, your character waits until the animation completes, then switches. This is incorrect. Especially if your jump animation is a single frame animation or a loop, your character will never face left until its the ground.

2. Camera limits do not work when following the player. Is there anyway to change this? It's possible its by design, but I would like to have this control, while still following the player.


Thanks for the wonderful kit,
Shawn

#1
10/11/2007 (8:23 pm)
Fixed #2.

The problem is when the camera is set in code, it is overwriting whatever settings you have set in the level file with hard coded values.

in PlayerActorComponent.cs at the end of the _OnRegister function you will see

camera.UseCameraWorldLimits = false;
camera.CameraWorldLimitMin = new Vector2(-1000, -1000);
camera.CameraWorldLimitMax = new Vector2(1000, 1000);

If you just comment that out or delete it, the levels will each use the values set within.

Next step, look into issue #1.