I am using Paradox 1.3.4-beta and I have created a new project using the New Game option. I am currently trying to move the sphere using the keyboard so I have attached a SyncScript similar to the one used in the controller sample. When using Visual Studio I cannot get it to stop on a breakpoint in this script. I have a Start and Update method both with breakpoints. It seems like the script is being ignored even though within Paradox it is shown as a component of the sphere.
I would love to help, but I cannot for the life of me, recreate your problem (breakpoints work fine for me).
Could you perhaps share a snippet of the code so we ca nsee the context?
Hi Lewis,
I have the feeling that your script is not executed at all even though I have no clue why. Could you share your project so that we can investigate?
Thanks !
Here is a link to the project:
https://drive.google.com/file/d/0B975No9BS7RJVVdxS1JNTVIwbk0/view?usp=sharing
I would agree that is seems like the script is not being executed at all. I did not have the same problem with the controller sample so it is a mystery to me.
Did you attach the script to the camera entity?
And does the camera entity have a physics component (with character as the selected item)?
I attached the script to the sphere that is created as part of the project when you create a new game. The sphere has a physics component with character selected. I did this so that it was the same as the controller sample.
Oh sorry, I misread it then. I assumed you were trying to move the camera. My mistake.
To move a character controller, I believe that you need to insert your vectors (playerDirection) into your character controller (playerController) by adding this line to the end of your update method:
playerController.Move(playerDirection);
or something like that.
And oh boy, I’m so absentminded, this wasn’t actually the original question now that I look it over.
Let me get back on track here:
Have you tried to put your input block into a while loop?
while (Game.IsRunning)
{
//code here
}
I admit this is just a blind shot, but I hope it helps in some way. I’m looking at your code, but I’m not actually compiling it or running it, so I can’t analyze it as well.
I just downloaded this and debugged it just fine. Are you starting the game from within Visual Studio?
(The only change I made was the default graphics profile to D3D 11.0. My GTX 580 can’t do 11.1 apparently)
Oh,
I also added a Infinite plane to the ground entity so the ball doesn’t fall straight through it. The Left/Right worked out of the box but the Up/Down was in the wrong plane needed to be UnitZ with your current setup.
The controller sample which does not seem that different to my project also works fine on my computer so my guess is that this is a just a glitch. I think that I might create a new project and see if the problem happens again.