-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GetCamera functions bug #75
Comments
Maybe something can be done in the above but for now there is only the workaround of waiting for Stride to initialize the Camera in the compositor. |
Same but there is another bug Game.SetupBase3DScene and Game.SetupBase does not name main camera as "Main"
and
bug fixable by changing line like this game.AddCamera("Main"); |
In this line I adding Test script to the entity. Is this correct way? I don't know because no documentation or example for adding script to entity in Stride Community Toolkit game.Run(start: (Scene rootScene) =>
{
game.SetupBase3DScene();
var entity = game.CreatePrimitive(PrimitiveModelType.Capsule);
entity.Transform.Position = new Vector3(0, 50, 0);
entity.Add(new Test()); // ---- This Line
entity.Scene = rootScene;
}); |
Ohh, that reminds me, I have to add some simple example how to add a script!! You can have a look at this example (which I am working on), how I am adding a script called stride-community-toolkit/examples/code-only/Example_CubicleCalamity/CubeStacker.cs Line 44 in 74ac438
but there might be other ways. Maybe @Doprez can suggest other alternatives. |
@Doprez, when I am adding a default camera in the |
If I remember correctly it gets the name from the camera slot in the GraphicsCompositor so naming through AddCamera would not work with that extension, BUT you could use that and then search through Scene entities instead of the GC. But yes @VaclavElias you might want to name it "Main" in the GraphicsCompositor camera slots otherwise that extension will never work unless the user adds a new slot to the GC named "Main". And it wont hurt to name the Entity itself to either "Main" or "MainCamera". |
This stride-community-toolkit/examples/code-only/Example_CubicleCalamity/CubeStacker.cs Lines 42 to 45 in 74ac438
compiles like this so this is the right way var entity = new Entity("GameManager") ;
entity.Add(new RaycastHandler()); |
Have replaced the old GetGCCamera functions. These ones should work on scene load now. This also releases 2 Entity extensions for making getting componenst in an Entity a little easier.
These are all using recursion so use sparingly. |
Before first frame rendered this code always prints
Other frames print these
(Sorry for my english)
The text was updated successfully, but these errors were encountered: