Game Development Community

Blaster Tutorial Movement Problem

by Michele Varriano · in Torque X 2D · 10/27/2009 (12:29 pm) · 4 replies

Alright so I just started using torque x 2D so I am not very good with it.

I recently went through the Blaster Tutorial which garage games offered. After I finished the tutorial the game was working fine until the player died. When this happens the controls freeze and the player continues moving in the direction they were moving when they died. I was wondering if anyone is able to help me fix this.

Let me know if you need to see any code

Thanks.

About the author

Recent Threads


#1
10/28/2009 (3:18 am)
There are two things that I can think of that might be causing this.

One is if the player object is being mounted to another object with conflicting physics: www.garagegames.com/community/forums/viewthread/100609

The second and more likely problem as that the inputmap isn't properly being cleared:
www.garagegames.com/community/forums/viewthread/72301

Hope one of those solves your problem.
#2
11/26/2009 (12:53 am)
This is happening to me too.
Sometimes it freezes in the spawn point, some times it moves in a direction (up, left, right, down) and you can kind of fight with it, but it still moves in the direction at a constant speed after being spawned after death.
#3
11/26/2009 (1:44 am)
Nevermind, I found out whats going on.

In Game.cs under Public Methods:
In "public void SpawnPlayerShip()"
Add the following code after the template is cloned
PlayerManager.Instance.GetPlayer(0).InputMap = new InputMap();
#4
11/27/2009 (11:50 am)
Thanks very much. That got it to work.